home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
NAMCHG.MOD
< prev
next >
Wrap
Text File
|
1992-01-29
|
2KB
|
52 lines
NAME (ALIAS) CHANGE MODIFICATION
By Several Authors
This mod will allow your users to change their name (alias) by typing
//NAME at the main prompt. Copy the following code to the section of void
mainmenu where you see other similar blocks of code (around CLS is good).
*/
if ((strcmp(s,"NAME")==0) && (thisuser.sl>=30)) {
nl();
prt(1,"Why do you feel that you need a new name?");
nl();
mpl(50);
strcpy(reason,"* Wants a new name because: ");
inputl(s3,50);
strcat(reason,s3);
sysoplog(reason);
nl();
prt2("What do you want as your new name? ");
nl();
outstr(": ");
input(s3,30);
if (finduser(s3)<1) {
strcpy(s2,"** Changed name to ");
strcat(s2,s3);
sysoplog(s2);
dsr(thisuser.name);
strcpy(thisuser.name,s3);
isr(usernum,thisuser.name);
write_user(usernum,&thisuser.name);
} else
prt2("Sorry, but that name is already in use. Try another.");
nl();
nl();
topscreen();
}
/*
The first line of the mod also determines what security level is required
to be able to change the name. Right now it is set at 30. Just change that
number to whatever you want as a minimum for the NAME function. Also be
sure to let your users know about the new command!
In the variable declaration section of void mainmenu(), be sure you have
s3[81] declared as a char. In other words,
char s3[81];
should be in there. You'll get an error during compilation if it isn't.
The Captain of The White Star Line
Long Beach, California - @2370