]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
m_timedbans Notice user when trying to set a ban that's already set
[user/henk/code/inspircd.git] / 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