I am trying to generate a function to change a players name while the person is online for unacceptable names according to our name policy. I got the function to change the name online but when the player logs in he has to use the old name to log into the mud, but comes into the mud as the new name. I looked in save_char in db.c, but I was kinda dumbfounded on how to go about making the name save in the pfile.. and make char_file_u char->name the same as ch-player.name Below is the function I used to modify the name. My big question is what to add to save_char to cause the names to be the same. ACMD(do_change_name) { struct char_data *vict; char tmp_name[20]; half_chop(argument, arg, tmp_name); if (!*arg) { send_to_char("Change Who's name to What?\n\r", ch); return; } if (!(vict = get_char_vis(ch, arg))) { send_to_char("No such person around.\n\r", ch); return; } if (IS_NPC(vict)){ send_to_char("This is Not for mobs OR Playing around!\n\r", ch); return; } if (strlen(tmp_name) > 10){ send_to_char("Names can not be more then 10 letters!\n\r", ch); return; } sprintf(buf2, "You change %s's name to %s.\n\r",GET_NAME(vict),tmp_name); send_to_char(buf2, ch); send_to_char("You better not be fooling around with this!\n\r", ch); sprintf(buf2, "(GC) %s changed %s's name to %s",GET_NAME(ch),GET_NAME(vict),tmp_name); mudlog(buf2, BRF, MAX(LEVEL_IMMORT, GET_INVIS_LEV(ch)), TRUE); CREATE(GET_NAME(vict), char, strlen(tmp_name) + 1); strcpy(GET_NAME(vict), CAP(tmp_name)); } ------------------------------------------------------------------------------ |\ /| | \ / | | \ / | | \/ | | | | | alice@epix.net Enough Said...
This archive was generated by hypermail 2b30 : 12/07/00 PST