X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cycle.cpp;h=c8b6bd8b4b82ec923e433c602a313da3ffa7d812;hb=4bb972550e79292c5571714103780d873f5e82aa;hp=e4cd0de60a0b1ef5f72bd195b54e25f1c3c98c72;hpb=98ef89c392a63bb7a78df5e8d8283c848f9dd2af;p=user%2Fhenk%2Fcode%2Finspircd.git 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