diff options
-rw-r--r-- | src/modules/m_chghost.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 60146c78b..ad8353cbd 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -37,15 +37,13 @@ class CommandChghost : public Command CmdResult Handle(const std::vector<std::string> ¶meters, User *user) { - const char* x = parameters[1].c_str(); - if (parameters[1].length() > ServerInstance->Config->Limits.MaxHost) { user->WriteNotice("*** CHGHOST: Host too long"); return CMD_FAILURE; } - for (; *x; x++) + for (std::string::const_iterator x = parameters[1].begin(); x != parameters[1].end(); x++) { if (!hostmap[(unsigned char)*x]) { |