home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
PRE412.ZIP
/
ELRIC42.MOD
< prev
next >
Wrap
Text File
|
1990-08-26
|
6KB
|
180 lines
Elric 42
Default Birthday Mod
This mod was written for Ebony Eyes, who complained about the user editor
when I met her at lunch today.
She said her problem was when you go to change someones birthday, you have to
re-enter the whole thing. I agree, it was irritating, having to re-enter
their birthday. So, I wrote up this quick little mod to change that.
What it does is allow you to hit return and keep the present value.
In addition to that, it prints the present value in square brackets []. Such
as:
Month you were born (1-12) [7] :
So in this example, the default would be 7.
The other change this incorporates is it allows users to either enter their
year of birth as the full 4 digit year or as just the last two digits, their
choice. Sort of a mini-mod in a mod. Call it Elric42.5.
Just as a bonus, after I finished this, I added some other things to print
out the birthday next to the age in Uedit. So, you might want to add that in
as well.
/** this step is indeed a form step, much like a form letter **/
1. From DOS, in your dir where you keep your source....
PKZIP SOURCE *.c *.h
If you already have a source zip file, then
PKZIP -f source *.c *.h
This way you have a copy of everything before you screw it up with a bad mod.
If you decide to take the mod out, it's as easy as
PKUNZIP -x source
and hit Y to overwrite any files you changed.
/** we now resume our regularly scheduled mod with step 2.... **/
2. Load up newuser.c. Search down for input_age, and make the following
marked changes/additions.
void input_age(userrec *u)
{
int a,ok,y,m,d;
char ag[10];
char s[81]; /** add line **/
do {
nl();
do {
nl();
sprintf(s,"Month you were born (1-12) [%u]: ",(int) u->month); /* change
*/
outstr(s); /** add line **/
input(ag,2);
if (ag[0]) /** add line **/
m=atoi(ag);
else /** add line **/
m=u->month; /** add line **/
} while ((!hangup) && ((m>12) || (m<1)));
do {
nl();
sprintf(s,"Day of month you were born (1-31) [%u]: ",(int) u->day); /*
change */
outstr(s); /** add line **/
input(ag,2);
if (ag[0]) /** add line **/
d=atoi(ag);
else /** add line **/
d=u->day; /** add line **/
} while ((!hangup) && ((d>31) || (d<1)));
do {
nl();
sprintf(s,"Year you were born (1900-) [%u]: ",((int)u->year)+1900); /*
change */
outstr(s); /** add line **/
input(ag,4);
if (ag[0]){ /** add line **/
y=atoi(ag);
if ((y>=0) && (y<=99)) /** add lines so they can enter last **/
y+=1900; /** two digits or full year **/
}
else /** add line **/
y=u->year+1900; /** add line **/
} while ((!hangup) && ((y>2000) || (y<1900)));
ok=1;
3. Save Newuser, and load up SYSOPF.C. Search down for print_data, and make
the following marked additions/deletions.
print("RN : ",(u->realname),"");
if ((u->callsign[0])!=0)
print("Call: ",(u->callsign),"");
print("PH : ",(u->phone),"");
/** add these lines to print_data in SYSOPF.C **/
sprintf(s,"Age : %2u Sex %c Birthday : %2u/%2u/%2u",
u->age, u->sex, (int) u->month, (int) u->day, (int) u->year);
pl(s);
/** end of addition **/
/** delete / comment out these lines **/
/*itoa(u->age,s,10);
s1[0]=32;
s1[1]=u->sex;
s1[2]=0;
print("Age : ",s,s1,""); */
/** end of deletion **/
strcpy(s,"PW : ");
strcat(s,(u->pw));
strcat(s,"\r\n");
4. Now, down in print_short, still in SYSOPF.C, make the same changes...
print("Name: ",nam(u,un),"");
print("RN : ",(u->realname),"");
print("PH : ",(u->phone),"");
/** add these lines to print_short in SYSOPF.C **/
sprintf(s,"Age : %2u Sex %c Birthday : %2u/%2u/%2u",
u->age, u->sex, (int) u->month, (int) u->day, (int) u->year);
pl(s);
/** end of addition **/
/** delete / comment out these lines **/
/*itoa(u->age,s,10);
s1[0]=32;
s1[1]=u->sex;
s1[2]=0;
print("Age : ",s,s1,""); */
/** end of deletion **/
print("Comp: ",&(ctypes[u->comp_type][0]),"");
if (u->note[0])
print("Note: ",(u->note),"");
if (u->ass_pts){
itoa(u->ass_pts,s,10);
print("Ass : ",s,"");
5. Now just re-compile and run.
/** hey, it's the form info file **/
As usual, I take no responsibility for hard drive crashes, death in the
family, or end of the world as we know it resulting from this mod.
It's your fault if you didn't back up the files before you made the mod.
It's your fault if you don't back up your ENTIRE hard drive AT LEAST once
a month.
It works on my system with Turbo C 2.0, WWIV 4.1, V20/8088, 640K/640EMS,
Dos 3.3.
If you use this, the only payment I ask is that you send me a note through
WWIVLink to 1@18251 saying you are using it...not too much to ask is it?
The Kingdom of Melnibone
(LINK ONLY Now)
812-877-3488 24 Hrs a day
3/12/2400/4800/9600/12,000/14,400 baud HST MNP5
Auto-validation of WWIV sysops on first call
Xmodem, Ymodem, DSZ Zmodem with retry, Ymodem-G
WWIV Link 1@18251