From 1de1a8c477c13b458b4a69faa610782fdbbbfcbf Mon Sep 17 00:00:00 2001 From: JamDog Date: Mon, 6 Apr 2009 17:48:00 +0000 Subject: [PATCH] Changing a player name (using 'set') no longer allows two-word names (thanks Slicer) --- changelog | 2 ++ src/act.wizard.c | 2 +- src/ban.c | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index cbcac02..f063cea 100644 --- a/changelog +++ b/changelog @@ -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 diff --git a/src/act.wizard.c b/src/act.wizard.c index 8ab7abf..90d63ff 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -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); diff --git a/src/ban.c b/src/ban.c index 091df7d..a69e622 100644 --- a/src/ban.c +++ b/src/ban.c @@ -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);