X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_deaf.cpp;h=43b24cfae9c6dba39b0f6ce6b0a64c40164c792b;hb=692865acd58c9a475db1fdf4d419188325cd2182;hp=45a53491cd623501133932ab68471f5f282e7cd3;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index 45a53491c..43b24cfae 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -68,12 +68,11 @@ class ModuleDeaf : public Module void init() { - if (!ServerInstance->Modes->AddMode(&m1)) - throw ModuleException("Could not add new modes!"); + 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)