ModuleDeaf()
: m1(this)
{
- if (!ServerInstance->Modes->AddMode(&m1))
- throw ModuleException("Could not add new modes!");
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(m1);
OnRehash(NULL);
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
-
virtual void OnRehash(User* user)
{
ConfigTag* tag = ServerInstance->Config->ConfValue("deaf");