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_callerid.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_callerid.cpp')
| -rw-r--r-- | src/modules/m_callerid.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 2b954a0e3..14b017f0b 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -209,7 +209,7 @@ public: CmdResult Handle(User* user, const Params& parameters) override { if (CommandParser::LoopCall(user, this, parameters, 0)) - return CMD_SUCCESS; + return CmdResult::SUCCESS; /* Even if callerid mode is not set, we let them manage their ACCEPT list so that if they go +g they can * have a list already setup. */ @@ -217,7 +217,7 @@ public: if (parameters[0] == "*") { ListAccept(user); - return CMD_SUCCESS; + return CmdResult::SUCCESS; } std::string tok = parameters[0]; @@ -225,18 +225,18 @@ public: if (!action.first) { user->WriteNumeric(Numerics::NoSuchNick(tok)); - return CMD_FAILURE; + return CmdResult::FAILURE; } if ((!IS_LOCAL(user)) && (!IS_LOCAL(action.first))) // Neither source nor target is local, forward the command to the server of target - return CMD_SUCCESS; + return CmdResult::SUCCESS; // The second item in the pair is true if the first char is a '+' (or nothing), false if it's a '-' if (action.second) - return (AddAccept(user, action.first) ? CMD_SUCCESS : CMD_FAILURE); + return (AddAccept(user, action.first) ? CmdResult::SUCCESS : CmdResult::FAILURE); else - return (RemoveAccept(user, action.first) ? CMD_SUCCESS : CMD_FAILURE); + return (RemoveAccept(user, action.first) ? CmdResult::SUCCESS : CmdResult::FAILURE); } RouteDescriptor GetRouting(User* user, const Params& parameters) override |
