summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-11-28 18:41:41 +0000
committerPeter Powell <petpow@saberuk.com>2017-11-28 18:47:39 +0000
commit758fc5fcbb988a1f3d692485e47cb8d253b2bc8d (patch)
tree0a972c454c2ee7dcfa58dd8b1e352630374a4e14 /src
parent204d78aaa7b1cbfa98ef39f3961ad5fe428cf12b (diff)
Use ERR_INVALIDUSERNAME rather than ERR_NEEDMOREPARAMS in USER.
This numeric is a lot more friendly for clients to deal with.
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_user/cmd_user.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/coremods/core_user/cmd_user.cpp b/src/coremods/core_user/cmd_user.cpp
index 8bf34665d..c4cdd9b37 100644
--- a/src/coremods/core_user/cmd_user.cpp
+++ b/src/coremods/core_user/cmd_user.cpp
@@ -21,6 +21,12 @@
#include "inspircd.h"
#include "core_user.h"
+enum
+{
+ // From ircu.
+ ERR_INVALIDUSERNAME = 468
+};
+
CommandUser::CommandUser(Module* parent)
: SplitCommand(parent, "USER", 4, 4)
{
@@ -36,11 +42,7 @@ CmdResult CommandUser::HandleLocal(const std::vector<std::string>& parameters, L
{
if (!ServerInstance->IsIdent(parameters[0]))
{
- /*
- * RFC says we must use this numeric, so we do. Let's make it a little more nub friendly though. :)
- * -- Craig, and then w00t.
- */
- user->WriteNumeric(ERR_NEEDMOREPARAMS, name, "Your username is not valid");
+ user->WriteNumeric(ERR_INVALIDUSERNAME, name, "Your username is not valid");
return CMD_FAILURE;
}
else