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_cgiirc.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_cgiirc.cpp')
| -rw-r--r-- | src/modules/m_cgiirc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 8dc504ad0..b4aed47ee 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -143,7 +143,7 @@ class CommandWebIRC : public SplitCommand CmdResult HandleLocal(LocalUser* user, const Params& parameters) override { if (user->registered == REG_ALL || realhost.get(user)) - return CMD_FAILURE; + return CmdResult::FAILURE; for (std::vector<WebIRCHost>::const_iterator iter = hosts.begin(); iter != hosts.end(); ++iter) { @@ -157,7 +157,7 @@ class CommandWebIRC : public SplitCommand WriteLog("Connecting user %s (%s) tried to use WEBIRC but gave an invalid IP address.", user->uuid.c_str(), user->GetIPString().c_str()); ServerInstance->Users.QuitUser(user, "WEBIRC: IP address is invalid: " + parameters[3]); - return CMD_FAILURE; + return CmdResult::FAILURE; } // The user matched a WebIRC block! @@ -198,13 +198,13 @@ class CommandWebIRC : public SplitCommand // Set the IP address sent via WEBIRC. We ignore the hostname and lookup // instead do our own DNS lookups because of unreliable gateways. user->SetClientIP(ipaddr); - return CMD_SUCCESS; + return CmdResult::SUCCESS; } WriteLog("Connecting user %s (%s) tried to use WEBIRC but didn't match any configured WebIRC hosts.", user->uuid.c_str(), user->GetIPString().c_str()); ServerInstance->Users.QuitUser(user, "WEBIRC: you don't match any configured WebIRC hosts."); - return CMD_FAILURE; + return CmdResult::FAILURE; } void WriteLog(const char* message, ...) CUSTOM_PRINTF(2, 3) |
