class ModuleTimedBans : public Module
{
- CommandTban* mycommand;
+ CommandTban cmd;
public:
ModuleTimedBans(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), cmd(Me)
{
-
- mycommand = new CommandTban(ServerInstance);
- ServerInstance->AddCommand(mycommand);
+ ServerInstance->AddCommand(&cmd);
TimedBanList.clear();
Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
ServerInstance->Modules->Attach(eventlist, this, 2);
CUList empty;
std::string expiry = "*** Timed ban on " + chan + " expired.";
- cr->WriteChannelWithServ(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
+ cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
ServerInstance->PI->SendChannelNotice(cr, '@', expiry);
if (ServerInstance->Config->AllowHalfop)
{