- f = new joinfloodsettings(ServerInstance, nsecs, njoins);
+ f = new joinfloodsettings(nsecs, njoins);
ext.set(channel, f);
channel->SetModeParam('j', parameter);
return MODEACTION_ALLOW;
ext.set(channel, f);
channel->SetModeParam('j', parameter);
return MODEACTION_ALLOW;
@@ -156,7+154,7 @@ class JoinFlood : public ModeHandler
// new mode param, replace old with new
if ((nsecs > 0) && (njoins > 0))
{
// new mode param, replace old with new
if ((nsecs > 0) && (njoins > 0))
{
- f = new joinfloodsettings(ServerInstance, nsecs, njoins);
+ f = new joinfloodsettings(nsecs, njoins);
ext.set(channel, f);
channel->SetModeParam('j', parameter);
return MODEACTION_ALLOW;
ext.set(channel, f);
channel->SetModeParam('j', parameter);
return MODEACTION_ALLOW;
@@ -196,8+194,8 @@ class ModuleJoinFlood : public Module
public:
public:
- ModuleJoinFlood(InspIRCd* Me)
- : Module(Me), jf(Me, this)
+ ModuleJoinFlood()
+ : jf(this)
{
if (!ServerInstance->Modes->AddMode(&jf))
{
if (!ServerInstance->Modes->AddMode(&jf))
@@ -237,7+235,7 @@ class ModuleJoinFlood : public Module
{
f->clear();
f->lock();
{
f->clear();
f->lock();
- memb->chan->WriteChannelWithServ((char*)ServerInstance->Config->ServerName, "NOTICE %s :This channel has been closed to new users for 60 seconds because there have been more than %d joins in %d seconds.", memb->chan->name.c_str(), f->joins, f->secs);
+ memb->chan->WriteChannelWithServ((char*)ServerInstance->Config->ServerName.c_str(), "NOTICE %s :This channel has been closed to new users for 60 seconds because there have been more than %d joins in %d seconds.", memb->chan->name.c_str(), f->joins, f->secs);
}
}
}
}
}
}
@@ -249,7+247,7 @@ class ModuleJoinFlood : public Module