#include "inspircd.h"
-/* $ModDesc: Provides channel mode +F (nick flood protection) */
-
/** Holds settings and state associated with channel mode +F
*/
class nickfloodsettings
ext.set(channel, new nickfloodsettings(nsecs, nnicks));
parameter = ConvToStr(nnicks) + ":" + ConvToStr(nsecs);
- channel->SetModeParam('F', parameter);
return MODEACTION_ALLOW;
}
else
{
- if (!channel->IsModeSet('F'))
+ if (!channel->IsModeSet(this))
return MODEACTION_DENY;
ext.unset(channel);
- channel->SetModeParam('F', "");
return MODEACTION_ALLOW;
}
}
{
ServerInstance->Modules->AddService(nf);
ServerInstance->Modules->AddService(nf.ext);
- Implementation eventlist[] = { I_OnUserPreNick, I_OnUserPostNick };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE