Changing a player name (using 'set') no longer allows two-word names (thanks Slicer)

This commit is contained in:
JamDog 2009-04-06 17:48:00 +00:00
parent cc5a63d732
commit 1de1a8c477
3 changed files with 7 additions and 1 deletions

View file

@ -34,6 +34,8 @@ OLC copy and delete options.
export (QQ's a zone into a tarball)t
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
(lots of major bugfixes too)
[Apr 06 2009] - Jamdog
Bug-Fix: Changing a player name no longer allows two words (thanks Slicer)
[Apr 05 2009] - Jamdog
Bug-Fix: Now frees memory used by qedit and hedit when closing a socket (Thanks Xiuhtecuhtli)
tbaMUD 3.59

View file

@ -4528,7 +4528,7 @@ bool change_player_name(struct char_data *ch, struct char_data *vict, char *new_
sprintf(buf, "mv %s %s", old_pfile, new_pfile);
j = system(buf);
/* Save the changed player index - the pfile is saved by perform_set, even though it is theorhetically un-necessary in this case */
/* Save the changed player index - the pfile is saved by perform_set */
save_player_index();
mudlog(BRF, LVL_IMMORT, TRUE, "(GC) %s changed the name of %s to %s", GET_NAME(ch), old_name, new_name);

View file

@ -257,6 +257,10 @@ int valid_name(char *newname)
if (!vowels)
return (0);
/* check spaces */
if (strchr(newname, ' '))
return (0);
/* return valid if list doesn't exist */
if (invalid_list == NULL || num_invalid < 1)
return (1);