void init()
{
- if (!ServerInstance->Modes->AddMode(&bm))
- throw ModuleException("Could not add new modes!");
+ ServerInstance->Modules->AddService(bm);
Implementation eventlist[] = { I_OnWhois };
- ServerInstance->Modules->Attach(eventlist, this, 1);
- }
-
- virtual ~ModuleBotMode()
- {
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual Version GetVersion()
ServerInstance->SendWhoisLine(src, dst, 335, src->nick+" "+dst->nick+" :is a bot on "+ServerInstance->Config->Network);
}
}
-
};
-
MODULE_INIT(ModuleBotMode)