summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-11 17:24:09 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-11 17:24:09 +0000
commit4be89477502dd1fd47164bbc88ba62eeedcd0d54 (patch)
treecc9c78013e7c60cdc562a48162a38c7492bdb33b
parent00c46713a3d2abc1650d7a4a3feb9b33d232e0f6 (diff)
Fix timedbans bug reported by jamie
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5217 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_timedbans.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 24b508372..a1f4411c3 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -64,10 +64,13 @@ class cmd_tban : public command_t
user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid ban mask");
return CMD_FAILURE;
}
- if (channel->IsBanned(user))
+ for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
{
- user->WriteServ("NOTICE "+std::string(user->nick)+" :The ban "+std::string(parameters[2])+" is already on the banlist of "+std::string(parameters[0]));
- return CMD_FAILURE;
+ if (!strcasecmp(i->data,parameters[2]))
+ {
+ user->WriteServ("NOTICE "+std::string(user->nick)+" :The ban "+std::string(parameters[2])+" is already on the banlist of "+std::string(parameters[0]));
+ return CMD_FAILURE;
+ }
}
TimedBan T;
std::string channelname = parameters[0];