summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-06-27 16:13:18 +0200
committerGitHub <noreply@github.com>2016-06-27 16:13:18 +0200
commit1c9f97682fe2a38d1ad80b059d20e316ccf8b65b (patch)
tree9f4b3f5477b17d83e7efc2f1bbb1d255d163e738
parentc050eb2d45c80cf15ffc5f427690d40059e2ae4a (diff)
parent5785411ac5949abb30620663e7831c3919710cbf (diff)
Merge pull request #1182 from SaberUK/master+431
Fix sending the wrong numeric when an empty new nick is received.
-rw-r--r--include/numerics.h1
-rw-r--r--src/coremods/core_user/cmd_nick.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/numerics.h b/include/numerics.h
index 2f25ac0cb..a6e8c337f 100644
--- a/include/numerics.h
+++ b/include/numerics.h
@@ -137,6 +137,7 @@ enum
ERR_NOTEXTTOSEND = 412,
ERR_UNKNOWNCOMMAND = 421,
ERR_NOMOTD = 422,
+ ERR_NONICKNAMEGIVEN = 431,
ERR_ERRONEUSNICKNAME = 432,
ERR_NICKNAMEINUSE = 433,
ERR_NORULES = 434, // unrealircd
diff --git a/src/coremods/core_user/cmd_nick.cpp b/src/coremods/core_user/cmd_nick.cpp
index 45e7adae5..75b9673a8 100644
--- a/src/coremods/core_user/cmd_nick.cpp
+++ b/src/coremods/core_user/cmd_nick.cpp
@@ -47,7 +47,7 @@ CmdResult CommandNick::HandleLocal(const std::vector<std::string>& parameters, L
if (newnick.empty())
{
- user->WriteNumeric(ERR_ERRONEUSNICKNAME, '*', "Erroneous Nickname");
+ user->WriteNumeric(ERR_NONICKNAMEGIVEN, '*', "No nickname given");
return CMD_FAILURE;
}