From 8776d4fffd0f777c04bc8fa765dd26e51a2f8d9b Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 26 Feb 2014 13:30:31 +0100 Subject: [PATCH] m_cycle Remove redundant IS_LOCAL() check --- src/modules/m_cycle.cpp | 20 +++++++------------- 1 file 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 -- 2.39.5