]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_timedbans Notice user when trying to set a ban that's already set
authorAttila Molnar <attilamolnar@hush.com>
Mon, 13 Apr 2015 13:49:29 +0000 (15:49 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 13 Apr 2015 13:49:29 +0000 (15:49 +0200)
src/modules/m_timedbans.cpp

index 754b4c3a0b2528626a497862ad6d7e9a3bc020f9..b473277046c0af470fbd3afea566c89711090711 100644 (file)
@@ -96,6 +96,13 @@ class CommandTban : public Command
                        user->WriteServ("NOTICE "+user->nick+" :Invalid ban mask");
                        return CMD_FAILURE;
                }
+
+               if (IsBanSet(channel, mask))
+               {
+                       user->WriteServ("NOTICE %s :Ban already set", user->nick.c_str());
+                       return CMD_FAILURE;
+               }
+
                setban.push_back(mask);
                // use CallHandler to make it so that the user sets the mode
                // themselves