mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-22 18:20:13 +01:00
Changing a player name (using 'set') no longer allows two-word names (thanks Slicer)
This commit is contained in:
parent
cc5a63d732
commit
1de1a8c477
3 changed files with 7 additions and 1 deletions
|
|
@ -34,6 +34,8 @@ OLC copy and delete options.
|
||||||
export (QQ's a zone into a tarball)t
|
export (QQ's a zone into a tarball)t
|
||||||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||||
(lots of major bugfixes too)
|
(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
|
[Apr 05 2009] - Jamdog
|
||||||
Bug-Fix: Now frees memory used by qedit and hedit when closing a socket (Thanks Xiuhtecuhtli)
|
Bug-Fix: Now frees memory used by qedit and hedit when closing a socket (Thanks Xiuhtecuhtli)
|
||||||
tbaMUD 3.59
|
tbaMUD 3.59
|
||||||
|
|
|
||||||
|
|
@ -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);
|
sprintf(buf, "mv %s %s", old_pfile, new_pfile);
|
||||||
j = system(buf);
|
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();
|
save_player_index();
|
||||||
|
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "(GC) %s changed the name of %s to %s", GET_NAME(ch), old_name, new_name);
|
mudlog(BRF, LVL_IMMORT, TRUE, "(GC) %s changed the name of %s to %s", GET_NAME(ch), old_name, new_name);
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,10 @@ int valid_name(char *newname)
|
||||||
if (!vowels)
|
if (!vowels)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
/* check spaces */
|
||||||
|
if (strchr(newname, ' '))
|
||||||
|
return (0);
|
||||||
|
|
||||||
/* return valid if list doesn't exist */
|
/* return valid if list doesn't exist */
|
||||||
if (invalid_list == NULL || num_invalid < 1)
|
if (invalid_list == NULL || num_invalid < 1)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue