summaryrefslogtreecommitdiff
path: root/src/modules/m_timedbans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_timedbans.cpp')
-rw-r--r--src/modules/m_timedbans.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 8639aa7df..08da114a6 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -64,13 +64,10 @@ class cmd_tban : public command_t
user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid ban mask");
return;
}
- for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
+ if (channel->IsBanned(user))
{
- 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;
- }
+ user->WriteServ("NOTICE "+std::string(user->nick)+" :The ban "+std::string(parameters[2])+" is already on the banlist of "+std::string(parameters[0]));
+ return;
}
TimedBan T;
std::string channelname = parameters[0];