home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
BBSADD.MOD
< prev
next >
Wrap
Text File
|
1992-12-01
|
5KB
|
234 lines
/*****************************************************************************
BBS ADD
by: Dude 1@13121
Here we go, a mod that prints a BBS Add after the Auto message, i wrote this
similar to the Automessage. But this is for you people that like to
advertise your bbs, so you write an automessage advertising your bbs. You
call back 1 hour later, and some guy has something else that is worthless
written in the automessage... This will print out a BBS Add right after
the Automessage.
*****************************************************************************/
Step 1
Load up BBSUTL1.C
Read (^KR) these files in the end of the bbsutl1.c file
void read_bbsadd()
{
int i,i1,i2,i3,f,len,ptrbeg[10],ptrend[10];
char s[81],l[6][81],anon,buf[512];
slrec ss;
strcpy(s,syscfg.gfilesdir);
strcat(s,"BBSADD.MSG");
f=open(s,O_RDWR | O_BINARY);
nl();
anon=status.amsganon;
if (f<1) {
prt(1,"No BBS Add, Make one by typing //BBSADD at the main menu");
} else {
len=read(f,(void *)buf,512);
close(f);
for (i=0; i<10; i++) {
ptrbeg[i]=0;
ptrend[i]=0;
}
i=0;
i1=0;
i2=0;
for(i=0; i<len; i++) {
if (i1) {
if (buf[i]==10) {
ptrbeg[i2]=i+1;
i1=0;
}
} else {
if (buf[i]==13) {
ptrend[i2]=i-1;
if (i2<6) {
for (i3=ptrbeg[i2]; i3<=ptrend[i2]; i3++)
l[i2][i3-ptrbeg[i2]]=buf[i3];
l[i2][ptrend[i2]-ptrbeg[i2]+1]=0;
}
++i2;
i1=1;
}
}
}
ss=syscfg.sl[thisuser.sl];
if (anon)
if (ss.ability & ability_read_post_anony) {
strcpy(s,"<<< ");
strcat(s,&(l[0][0]));
strcat(s," >>>");
} else
strcpy(s,">UNKNOWN<");
else
strcpy(s,&(l[0][0]));
nl();
prt(2,"BBS Add by: %s",s,"");
nl();
i=1;
while ((ptrend[i]) && (i<6)) {
pl(&(l[i][0]));
++i;
}
}
nl();
}
void write_bbsadd1()
{
int i,i1,f;
char s[81],l[4][81];
slrec ss;
nl();
prt(1,"Please Enter your BBS Add, you have 3 lines:");
nl();
for (i=0; i<3; i++) {
outchr(i+'1');
outchr(':');
inputl(&(l[i][0]),39);
strcat(&(l[i][0]),"\r\n");
}
nl();
ss=syscfg.sl[thisuser.sl];
if (ss.ability & ability_post_anony) {
prt(5,"Anonymous? ");
if (yn())
i1=anony_sender;
else
i1=0;
} else
i1=0;
prt(5,"Is this OK? ");
if (yn()) {
status.amsganon=i1;
status.amsguser=usernum;
save_status();
strcpy(s,syscfg.gfilesdir);
strcat(s,"BBSADD.MSG");
f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
strcpy(s,nam(&thisuser,usernum));
strcat(s,"\r\n");
write(f,(void *)s,strlen(s));
for (i=0; i<3; i++)
write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
sysoplog("Changed BBS Add");
for (i=0; i<3; i++) {
strcpy(s," ");
l[i][strlen(&(l[i][0]))-2]=0;
strcat(s,&(l[i][0]));
sysoplog(s);
}
nl();
prt(3,"Thank you, Your BBS Add is Saved...");
nl();
close(f);
}
}
void write_bbsadd()
{
char ch;
int done,okwrite;
slrec ss;
ss=syscfg.sl[thisuser.sl];
if (ss.posts)
okwrite=1;
else
okwrite=0;
done=0;
do {
nl();
if (okwrite) {
prt(2,"=============] BBS Add Menu [============");
nl();
nl();
prt(5,"R - Read"); nl();
prt(5,"W - Write"); nl();
prt(5,"Q - Quit"); nl();
prt(1,"[BBS Add Menu] : ");
ch=onek("QRW");
}
switch(ch) {
case 'Q':
done=1;
break;
case 'R':
read_bbsadd();
break;
case 'W':
write_bbsadd1();
break;
}
} while ((!done) && (!hangup));
}
Step 2
Load up BBS.C
if (strcmp(s,"CLS")==0) /* SEARCH */
outstr("\x0c");
if (strcmp(s,"/O")==0)
hangup=1;
if (strcmp(s,"/E")==0)
slash_e();
if (strcmp(s,"/N")==0)
nscan(cursub);
if (strcmp(s,"NET")==0)
print_net_listing();
if (strcmp(s,"BBSADD")==0) /* ADD */
write_bbsadd(); /* ADD */
if (strcmp(s,"VER")==0) {
nl();
pl(VERSION_NUMBER);
nl();
pl("The author may be contacted at:");
nl();
pl(" Wayne Bell");
pl(" 904 Silver Spur Road #636");
pl(" Rolling Hills Estates, CA 90274");
nl();
}
Step 3
Load up BBSUTL.C
IN - "void logon()"
if (live_user)
read_automessage(); /* SEARCH */
if (live_user) /* ADD */
read_bbsadd(); /* ADD */
timeon=timer();
useron=1;
if (live_user)
topscreen();
You may get a Warning, but i have seen no cause for alarm with it
Disclaimer -> I am NOT Responsible if it Nukes your house, kills your goldfish
or Sucks you through the Floppy Drive.... or messes up your bbs.....
I hope you enjoy this mod.... Tell me if you are using it.... E-mail me on ANY
WWIVLink BBS i am (1@13121)
Thanks.......