- cmd_tban () : command_t("TBAN", 0, 3)
+ cmd_tban (InspIRCd* Instance) : command_t(Instance,"TBAN", 0, 3)
}
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
{
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]));
}
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
{
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]));
- unsigned long expire = Srv->CalcDuration(parameters[1]) + time(NULL);
- if (Srv->CalcDuration(parameters[1]) < 1)
+ unsigned long expire = ServerInstance->Duration(parameters[1]) + time(NULL);
+ if (ServerInstance->Duration(parameters[1]) < 1)
- snprintf(duration,MAXBUF,"%lu",Srv->CalcDuration(parameters[1]));
+ snprintf(duration,MAXBUF,"%lu",ServerInstance->Duration(parameters[1]));
- Srv->CallCommandHandler("MODE",setban,3,user);
+ ServerInstance->CallCommandHandler("MODE",setban,3,user);
/* Check if the ban was actually added (e.g. banlist was NOT full) */
bool was_added = false;
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
/* Check if the ban was actually added (e.g. banlist was NOT full) */
bool was_added = false;
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
- channel->WriteChannelWithServ(Srv->GetServerName().c_str(), "NOTICE %s :%s added a timed ban on %s lasting for %s seconds.", channel->name, user->nick, mask.c_str(), duration);
+ channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s added a timed ban on %s lasting for %s seconds.", channel->name, user->nick, mask.c_str(), duration);
+ return CMD_SUCCESS;
}
else user->WriteServ("482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, channel->name);
}
else user->WriteServ("482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, channel->name);
- cr->WriteChannelWithServ(Srv->GetServerName().c_str(), "NOTICE %s :Timed ban on %s expired.", cr->name, i->mask.c_str());
+ cr->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :Timed ban on %s expired.", cr->name, i->mask.c_str());
// hash and set its descriptor to FD_MAGIC_NUMBER so the data
// falls into the abyss :p
userrec* temp = new userrec(ServerInstance);
// hash and set its descriptor to FD_MAGIC_NUMBER so the data
// falls into the abyss :p
userrec* temp = new userrec(ServerInstance);
- return Version(1,0,0,0,VF_VENDOR);
+ return Version(1,1,0,0,VF_VENDOR,API_VERSION);