home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
PRE412.ZIP
/
MAILALL.MOD
< prev
next >
Wrap
Text File
|
1992-01-21
|
5KB
|
188 lines
MultiMail to All
(MAILALL.MOD)
Version 2.0
by
Ethereal Cereal
I've been asked by a few of the visiting sysops on my system to release my
multimail to all users mod. This one is pretty easy to install, but I'm sure
there are better ways to go about it. For example, it will continuously ask
you for a title. Anyhow it does work.
As usual with most of these mods, the author (me) takes no resposibility
what-so-ever if this mod causes your cat to jump on your keyboard and
delete every user you have or if your modem decides it doesn't like you
and fries itself, committing datacide...
───────────────────────────────────────────────────────────────────────────────
Crispy Software #5
Ethereal Cereal #16
Multi-Networked The Downtown Tower Multi-Lined (soon)
Home of CrispySoft ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ WWIV On A LAN (Host)
618-234-6892 WWIVlink: @16853 USR Dual Standard
Sysop Autoval FredNET : @6888 700+ WWIV Files Online
WL2SP Support WWIVnet : @6866 Snarfable!
More Fun Than A Normal Human Being Can Stand
───────────────────────────────────────────────────────────────────────────────
/***********************/
/* L E G E N D */
/***********************/
/* - = Deleted Line */
/* + = New Line */
/* # = Existing Line */
/* ! = Modified Line */
/* * = Search For Line */
/***********************/
Step #1 -- MULTMAIL.C
Function -- N/A
Comments -- add this function
void mailall()
/* MOD -- MAILALL.MOD v2. Allows you to Multimail ALL users on the system */
{
int i,i1,f,len,an,cv,ok;
mailrec m,m1;
char s[81],s1[81],t[81];
userrec ur;
slrec ss;
if (freek1(syscfg.msgsdir)<10.0) {
nl();
pl("Sorry, not enough disk space left.");
nl();
return;
}
nl();
sprintf(s,"%sEMAIL.DAT",syscfg.datadir);
ss=syscfg.sl[actsl];
if (ss.ability & ability_email_anony)
i=anony_enable_anony;
else
i=0;
m.msg.storage_type=EMAIL_STORAGE;
strcpy(irt,"Mail to ALL Users");
irt_name[0]=0;
inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN);
if (m.msg.stored_as==0xffffffff)
return;
strcpy(m.title,t);
m.anony=i;
m.fromsys=0;
m.fromuser=usernum;
m.tosys=0;
m.touser=0;
m.status=status_multimail;
time((long *)&(m.daten));
f=open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
len=(int) filelength(f)/sizeof(mailrec);
if (len==0)
i=0;
else {
i=len-1;
lseek(f,((long) (i))*(sizeof(mailrec)), SEEK_SET);
read(f,(void *)&m1,sizeof(mailrec));
while ((i>0) && (m1.tosys==0) && (m1.touser==0)) {
--i;
lseek(f,((long) (i))*(sizeof(mailrec)), SEEK_SET);
i1=read(f,(void *)&m1,sizeof(mailrec));
if (i1==-1)
pl("DIDN'T READ RIGHT.");
}
if ((m1.tosys) || (m1.touser))
++i;
}
lseek(f,((long) (i))*(sizeof(mailrec)), SEEK_SET);
pl("Mail sent to:");
sysoplog("Multi-Mail sent to all users . . .");
for (cv=0; cv<status.users; cv++) {
read_user(smallist[cv].number,&ur);
ok=1;
if (((ur.sl==255) && (ur.waiting>(syscfg.maxwaiting * 5))) ||
((ur.sl!=255) && (ur.waiting>syscfg.maxwaiting)) ||
(ur.waiting>200)) {
sprintf(s,"%s mailbox full, not sent.",nam(&ur,smallist[cv].number));
sysoplog(s);
npr(s);
nl();
ok=0;
}
if (ur.inact & inact_deleted) {
sprintf(s,"User #%d deleted, not sent.",smallist[cv].number);
sysoplog(s);
npr(s);
nl();
ok=0;
}
if (ok) {
m.touser=smallist[cv].number;
write(f,(void *)&m,sizeof(mailrec));
strcpy(s," ");
++ur.waiting;
write_user(smallist[cv].number,&ur);
if (smallist[cv].number==1)
++fwaiting;
strcat(s,nam(&ur,smallist[cv].number));
if (smallist[cv].number==1) {
++status.fbacktoday;
++thisuser.feedbacksent;
++thisuser.fsenttoday1;
++fsenttoday;
} else {
++status.emailtoday;
++thisuser.etoday;
++thisuser.emailsent;
}
pl(s);
}
}
close_user();
close(f);
save_status();
if (!wfc)
topscreen();
}
Step #2 -- MULTMAIL.C
Function -- N/A
Comments --
Modify this line...
# nl();
+ if (so()) {
+ prt(2,"Multi-Mail: A,M,D,L,E,Q,S,? : ");
+ ch=onek("QAMDELS?");
+ } else {
# prt(2,"Multi-Mail: A,M,D,L,E,Q,? : ");
# ch=onek("QAMDEL?");
+ }
# switch(ch) {
# case '?':
Step #3 -- MULTMAIL.C
Function -- N/A
Comments --
Add this case in with the others...
case 'S':
mailall();
break;
════WWIV═4.11═Etherealized══════════════════════════The Downtown Tower═════════
600+ WWIV Files!!! -*- WWIVLink @16853 -*- USR Dual Standard -*- Sysop Autoval