summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-26 13:30:31 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-26 13:30:31 +0100
commit8776d4fffd0f777c04bc8fa765dd26e51a2f8d9b (patch)
tree3f4d6c12eff0a62060156d4258181cdf92d55685
parent1a3c9fea07ae1e27bdee6ddfa408789daf815203 (diff)
m_cycle Remove redundant IS_LOCAL() check
-rw-r--r--src/modules/m_cycle.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index e4cd0de60..c8b6bd8b4 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -50,22 +50,16 @@ class CommandCycle : public SplitCommand
if (channel->HasUser(user))
{
- /*
- * technically, this is only ever sent locally, but pays to be safe ;p
- */
- if (IS_LOCAL(user))
+ if (channel->GetPrefixValue(user) < VOICE_VALUE && channel->IsBanned(user))
{
- if (channel->GetPrefixValue(user) < VOICE_VALUE && channel->IsBanned(user))
- {
- /* banned, boned. drop the message. */
- user->WriteNotice("*** You may not cycle, as you are banned on channel " + channel->name);
- return CMD_FAILURE;
- }
-
- channel->PartUser(user, reason);
- Channel::JoinUser(user, parameters[0], true);
+ // User is banned, send an error and don't cycle them
+ user->WriteNotice("*** You may not cycle, as you are banned on channel " + channel->name);
+ return CMD_FAILURE;
}
+ channel->PartUser(user, reason);
+ Channel::JoinUser(user, parameters[0], true);
+
return CMD_SUCCESS;
}
else