]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cycle.cpp
Merge branch 'master+gnutlsprio'
[user/henk/code/inspircd.git] / src / modules / m_cycle.cpp
index e4cd0de60a0b1ef5f72bd195b54e25f1c3c98c72..c8b6bd8b4b82ec923e433c602a313da3ffa7d812 100644 (file)
@@ -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