#include "inspircd.h"
-/* $ModDesc: Provides channel mode +j (join flood protection) */
-
/** Holds settings and state associated with channel mode +j
*/
class joinfloodsettings
ext.set(channel, jfs);
parameter = ConvToStr(njoins) + ":" + ConvToStr(nsecs);
- channel->SetModeParam(this, parameter);
return MODEACTION_ALLOW;
}
else
if (f)
{
ext.unset(channel);
- channel->SetModeParam(this, "");
return MODEACTION_ALLOW;
}
}
{
ServerInstance->Modules->AddService(jf);
ServerInstance->Modules->AddService(jf.ext);
- Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserJoin };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE