summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-04-13 15:49:29 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-04-13 15:49:29 +0200
commit4e24fb7c19cff866eda602349fbafce78b7e4c51 (patch)
tree79918c3014f55ffdcdafce7f3330dc5fda60573b /src
parentb7526f6efd47ed87dc67adfa70f09c9b83adf9a8 (diff)
m_timedbans Notice user when trying to set a ban that's already set
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_timedbans.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 754b4c3a0..b47327704 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -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