class ModuleNoCTCP : public Module
{
-
NoCTCP nc;
public:
-
ModuleNoCTCP()
: nc(this)
{
void init()
{
- if (!ServerInstance->Modes->AddMode(&nc))
- throw ModuleException("Could not add new modes!");
+ ServerInstance->Modules->AddService(nc);
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 3);
- }
-
- virtual ~ModuleNoCTCP()
- {
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual Version GetVersion()
return MOD_RES_PASSTHRU;
}
- virtual void On005Numeric(std::string &output)
+ virtual void On005Numeric(std::map<std::string, std::string>& tokens)
{
- ServerInstance->AddExtBanChar('C');
+ tokens["EXTBAN"].push_back('C');
}
};