aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/ftopic.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-10-26 23:40:24 +0000
committerGravatar Sadie Powell2020-10-27 00:59:11 +0000
commit7cb27dabe695505d2eb7b942c4fbf518dda8e6b3 (patch)
tree12f7541d3389efa9a084d2a4859d6ce4ede43b03 /src/modules/m_spanningtree/ftopic.cpp
parentReplace 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/ftopic.cpp')
-rw-r--r--src/modules/m_spanningtree/ftopic.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/ftopic.cpp b/src/modules/m_spanningtree/ftopic.cpp
index 2f9813860..243d2e398 100644
--- a/src/modules/m_spanningtree/ftopic.cpp
+++ b/src/modules/m_spanningtree/ftopic.cpp
@@ -30,16 +30,16 @@ CmdResult CommandFTopic::Handle(User* user, Params& params)
{
Channel* c = ServerInstance->FindChan(params[0]);
if (!c)
- return CMD_FAILURE;
+ return CmdResult::FAILURE;
if (c->age < ServerCommand::ExtractTS(params[1]))
// Our channel TS is older, nothing to do
- return CMD_FAILURE;
+ return CmdResult::FAILURE;
// Channel::topicset is initialized to 0 on channel creation, so their ts will always win if we never had a topic
time_t ts = ServerCommand::ExtractTS(params[2]);
if (ts < c->topicset)
- return CMD_FAILURE;
+ return CmdResult::FAILURE;
// The topic text is always the last parameter
const std::string& newtopic = params.back();
@@ -60,15 +60,15 @@ CmdResult CommandFTopic::Handle(User* user, Params& params)
{
// Discard if their topic text is "smaller"
if (c->topic > newtopic)
- return CMD_FAILURE;
+ return CmdResult::FAILURE;
// If the texts are equal in addition to the timestamps, decide which setter to keep
if ((c->topic == newtopic) && (c->setby >= setter))
- return CMD_FAILURE;
+ return CmdResult::FAILURE;
}
c->SetTopic(user, newtopic, ts, &setter);
- return CMD_SUCCESS;
+ return CmdResult::SUCCESS;
}
// Used when bursting and in reply to RESYNC, contains topic setter as the 4th parameter