From 4e24fb7c19cff866eda602349fbafce78b7e4c51 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 13 Apr 2015 15:49:29 +0200 Subject: m_timedbans Notice user when trying to set a ban that's already set --- src/modules/m_timedbans.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules') 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 -- cgit v1.2.3