#include "users.h"
#include "channels.h"
#include "modules.h"
-
#include "hashcomp.h"
#include "configreader.h"
#include "inspircd.h"
-
-
+/** Holds a timed ban
+ */
class TimedBan : public classbase
{
public:
typedef std::vector<TimedBan> timedbans;
timedbans TimedBanList;
+/** Handle /TBAN
+ */
class cmd_tban : public command_t
{
public:
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];
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_VENDOR);
+ return Version(1,1,0,0,VF_VENDOR,API_VERSION);
}
};