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_sapart.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_sapart.cpp')
| -rw-r--r-- | src/modules/m_sapart.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 10c73cd6a..3b6813884 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -40,7 +40,7 @@ class CommandSapart : public Command CmdResult Handle(User* user, const Params& parameters) override { if (CommandParser::LoopCall(user, this, parameters, 1)) - return CMD_FAILURE; + return CmdResult::FAILURE; User* dest = ServerInstance->Users.Find(parameters[0]); Channel* channel = ServerInstance->FindChan(parameters[1]); @@ -54,17 +54,17 @@ class CommandSapart : public Command if (dest->server->IsULine()) { user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a U-lined client"); - return CMD_FAILURE; + return CmdResult::FAILURE; } if (!channel->HasUser(dest)) { user->WriteNotice("*** " + dest->nick + " is not on " + channel->name); - return CMD_FAILURE; + return CmdResult::FAILURE; } /* For local clients, directly part them generating a PART message. For remote clients, - * just return CMD_SUCCESS knowing the protocol module will route the SAPART to the users + * just return CmdResult::SUCCESS knowing the protocol module will route the SAPART to the users * local server and that will generate the PART instead */ if (IS_LOCAL(dest)) @@ -73,14 +73,14 @@ class CommandSapart : public Command ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used SAPART to make "+dest->nick+" part "+channel->name); } - return CMD_SUCCESS; + return CmdResult::SUCCESS; } else { user->WriteNotice("*** Invalid nickname or channel"); } - return CMD_FAILURE; + return CmdResult::FAILURE; } RouteDescriptor GetRouting(User* user, const Params& parameters) override |
