diff options
| author | 2020-10-26 23:40:24 +0000 | |
|---|---|---|
| committer | 2020-10-27 00:59:11 +0000 | |
| commit | 7cb27dabe695505d2eb7b942c4fbf518dda8e6b3 (patch) | |
| tree | 12f7541d3389efa9a084d2a4859d6ce4ede43b03 /src/modules/m_sethost.cpp | |
| parent | Replace the check for eventfd() with a C++17 header check. (diff) | |
Convert CmdResult to an 8-bit strongly typed enum.
Diffstat (limited to 'src/modules/m_sethost.cpp')
| -rw-r--r-- | src/modules/m_sethost.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 6f4e8a8dc..ef7a8c315 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -45,7 +45,7 @@ class CommandSethost : public Command if (parameters[0].length() > ServerInstance->Config->Limits.MaxHost) { user->WriteNotice("*** SETHOST: Host too long"); - return CMD_FAILURE; + return CmdResult::FAILURE; } for (std::string::const_iterator x = parameters[0].begin(); x != parameters[0].end(); x++) @@ -53,17 +53,17 @@ class CommandSethost : public Command if (!hostmap.test(static_cast<unsigned char>(*x))) { user->WriteNotice("*** SETHOST: Invalid characters in hostname"); - return CMD_FAILURE; + return CmdResult::FAILURE; } } if (user->ChangeDisplayedHost(parameters[0])) { ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->GetDisplayedHost()); - return CMD_SUCCESS; + return CmdResult::SUCCESS; } - return CMD_FAILURE; + return CmdResult::FAILURE; } }; |
