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_spanningtree/server.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_spanningtree/server.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index f73f9d6db..1cd5608b7 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -47,21 +47,21 @@ CmdResult CommandServer::HandleServer(TreeServer* ParentOfThis, Params& params) if (!InspIRCd::IsSID(sid)) { socket->SendError("Invalid format server ID: "+sid+"!"); - return CMD_FAILURE; + return CmdResult::FAILURE; } TreeServer* CheckDupe = Utils->FindServer(servername); if (CheckDupe) { socket->SendError("Server "+servername+" already exists!"); ServerInstance->SNO.WriteToSnoMask('L', "Server \002"+CheckDupe->GetName()+"\002 being introduced from \002" + ParentOfThis->GetName() + "\002 denied, already exists. Closing link with " + ParentOfThis->GetName()); - return CMD_FAILURE; + return CmdResult::FAILURE; } CheckDupe = Utils->FindServer(sid); if (CheckDupe) { socket->SendError("Server ID "+sid+" already exists! You may want to specify the server ID for the server manually with <server:id> so they do not conflict."); ServerInstance->SNO.WriteToSnoMask('L', "Server \002"+servername+"\002 being introduced from \002" + ParentOfThis->GetName() + "\002 denied, server ID already exists on the network. Closing link with " + ParentOfThis->GetName()); - return CMD_FAILURE; + return CmdResult::FAILURE; } TreeServer* route = ParentOfThis->GetRoute(); @@ -71,7 +71,7 @@ CmdResult CommandServer::HandleServer(TreeServer* ParentOfThis, Params& params) HandleExtra(Node, params); ServerInstance->SNO.WriteToSnoMask('L', "Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")"); - return CMD_SUCCESS; + return CmdResult::SUCCESS; } void CommandServer::HandleExtra(TreeServer* newserver, Params& params) |
