summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-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