X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nonotice.cpp;h=c5b9f3a1c784f6dd894a4ec6b6d5237705826f73;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=1a806d08372c840678a1830de3103f21a5530484;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 1a806d083..c5b9f3a1c 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -41,10 +41,9 @@ class ModuleNoNotice : public Module void init() { - if (!ServerInstance->Modes->AddMode(&nt)) - throw ModuleException("Could not add new modes!"); + ServerInstance->Modules->AddService(nt); Implementation eventlist[] = { I_OnUserPreNotice, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual void On005Numeric(std::string &output) @@ -60,11 +59,6 @@ class ModuleNoNotice : public Module Channel* c = (Channel*)dest; if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet('T'))) { - if (ServerInstance->ULine(user->server)) - { - // ulines are exempt. - return MOD_RES_PASSTHRU; - } res = ServerInstance->OnCheckExemption(user,c,"nonotice"); if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU;