home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
BDAY.MOD
< prev
next >
Wrap
Text File
|
1990-10-07
|
5KB
|
110 lines
East Bay Ray #1 @9964
Wed Oct 03 22:31:49 1990
HAPPY BIRTHDAY MODIFICATION (BDAY412.MOD)
By Walter Liebkemann (@5404)
Auto-Message Modification By The Captain (@2370)
v4.12 Conversion by East Bay Ray 1@9964
================================================================================
This modification will say, "Happy Birthday!" to a user on that user's first
call after his/her birthday. It will also present the user with a gift of 50
gold pieces (or however many you want to give, if any), and it will change the
auto-message to let everybody else know whose birthday it is. The latter two
features are optional. If you do not want to give your users any gold, you
don't have to. If you don't want the auto-message to say whose birthday it is,
that is also your choice. All code changes are in BBSUTL.C.
================================================================================
Search for void logon() and add the following variable declarations:
void logon() /* EXISTING LINE */
{ /* " */
char s[255],s1[81],s2[81],*ss; /* " */
int i,i1,f; /* " */
long len,pos; /* " */
char s3[31], l[4][81]; /* ADD */
Also in void logon, search for the following lines:
if (thisuser.year) {
s[0]=years_old(thisuser.month,thisuser.day,thisuser.year);
if (thisuser.age!=s[0]) {
thisuser.age=s[0];
and add the following block of code. If you do not want to give any gold on the
user's birthday, do not include the lines marked with /**/.
nl(); nl(); nl();
prt(3," --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--");
nl();
prt(5," Happy Birthday to you, Happy Birthday to you, Happy Birthday");
nl();
ansic(5);
print(" dear ",thisuser.name,", Happy Birthday to you!","");
nl();
prt(3," --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--");
nl(); nl();
/**/ prt(2," The SysOp presents you with 50 shiny gold pieces as a");
/**/ nl();
/**/ prt(2," birthday present from the BBS!");
/**/ nl();
prt(3," --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--");
nl();
pausescr();
----------------------------------------------------------------------------
Add the following block of code immediately after the above block if you want
the auto-message to be changed to say whose birthday it is.
itoa(thisuser.age,s3,10);
strcpy(&(l[0][0]),"Happy Birthday wishes are extended to ");
strcat(&(l[0][0]),thisuser.name);
strcat(&(l[0][0]),",");
strcat(&(l[0][0]),"\r\n");
strcpy(&(l[1][0]),"who is now ");
strcat(&(l[1][0]),s3);
strcat(&(l[1][0])," years old!");
strcat(&(l[1][0]),"\r\n");
status.amsganon=0;
status.amsguser=usernum;
save_status();
strcpy(s,syscfg.gfilesdir);
strcat(s,"AUTO.MSG");
f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
strcpy(s,"The Management"); /* SEE NOTE BELOW */
strcat(s,"\r\n");
write(f,(void *)s,strlen(s));
for (i=0; i<2; i++)
write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
sysoplog("Happy Birthday Auto-Message");
for (i=0; i<2; i++) {
strcpy(s," ");
l[i][strlen(&(l[i][0]))-2]=0;
strcat(s,&(l[i][0]));
sysoplog(s);
}
close(f);
thisuser.gold +=50.0; /* ADD THIS LINE IF YOU WANT TO GIVE GOLD */
} /* EXISTING LINE */
} else { /* " */
nl(); /* " */
pl("Please enter the following information:"); /* " */
-----------------------------------------------------------------------------
Note: The Auto-Message will say it was written by "The Management" without a
user number. You can change this to whatever you want (ie, The Birthday
Committee, The SysOp, President Bush, etc.)
That's all there is to it. Now everybody will know whose birthday it is.
Auto-replying to the auto-message will result in a letter addressed to the
birthday boy or girl, so users can use that to add happy birthday wishes if
they choose.
-----------------------------------------------------------------------------
DISCLAIMER
That's the end of the modification; all's been said and done.
I doubt there's ever been a time when you've had this much fun.
So if this mod causes a problem to which there's no easy solution;
Recall I've not nor will I ever ask for a contribution.
The Captain of The White Star Line (System Long Gone)