diff options
-rw-r--r-- | src/modules/m_sethost.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index a5f36da65..e2a5dc281 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -36,6 +36,12 @@ class CommandSethost : public Command CmdResult Handle (const std::vector<std::string>& parameters, User *user) { + if (parameters[0].length() > ServerInstance->Config->Limits.MaxHost) + { + user->WriteNotice("*** SETHOST: Host too long"); + return CMD_FAILURE; + } + for (std::string::const_iterator x = parameters[0].begin(); x != parameters[0].end(); x++) { if (!hostmap[(const unsigned char)*x]) @@ -45,12 +51,6 @@ class CommandSethost : public Command } } - if (parameters[0].length() > ServerInstance->Config->Limits.MaxHost) - { - user->WriteNotice("*** SETHOST: Host too long"); - return CMD_FAILURE; - } - if (user->ChangeDisplayedHost(parameters[0])) { ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->dhost); |