void init()
{
- if (!ServerInstance->Modes->AddMode(&nk))
- throw ModuleException("Could not add new modes!");
+ ServerInstance->Modules->AddService(nk);
Implementation eventlist[] = { I_OnUserPreKick, I_On005Numeric };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- void On005Numeric(std::string &output)
+ void On005Numeric(std::map<std::string, std::string>& tokens)
{
- ServerInstance->AddExtBanChar('Q');
+ tokens["EXTBAN"].push_back('Q');
}
ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason)
return MOD_RES_PASSTHRU;
}
- ~ModuleNoKicks()
- {
- }
-
Version GetVersion()
{
return Version("Provides channel mode +Q to prevent kicks on the channel.", VF_VENDOR);
}
};
-
MODULE_INIT(ModuleNoKicks)