@@ -42,6+41,8 @@ class TimedBan : public classbase
typedef std::vector<TimedBan> timedbans;
timedbans TimedBanList;
typedef std::vector<TimedBan> timedbans;
timedbans TimedBanList;
+/** Handle /TBAN
+ */
class cmd_tban : public command_t
{
public:
class cmd_tban : public command_t
{
public:
@@ -64,10+65,13 @@ class cmd_tban : public command_t
user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid ban mask");
return CMD_FAILURE;
}
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];
}
TimedBan T;
std::string channelname = parameters[0];
@@ -201,7+205,7 @@ class ModuleTimedBans : public Module