X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nonotice.cpp;h=2fbecc812eec42c932a3fa1cda2d7ac83e4805f6;hb=4ab1c43c1eee708fc50a4808f714a731891b75e8;hp=d95ea8b8a4cf58f2bb91080f756a94ed989c2433;hpb=349106f3f9f75d7f957fc5d1e71ca650f4807bb9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index d95ea8b8a..2fbecc812 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -39,19 +39,19 @@ class ModuleNoNotice : public Module { } - void init() + void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(nt); Implementation eventlist[] = { I_OnUserPreNotice, I_On005Numeric }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } - virtual void On005Numeric(std::string &output) + void On005Numeric(std::map& tokens) CXX11_OVERRIDE { - ServerInstance->AddExtBanChar('T'); + tokens["EXTBAN"].push_back('T'); } - virtual ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) + ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) CXX11_OVERRIDE { ModResult res; if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user))) @@ -59,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; @@ -77,11 +72,7 @@ class ModuleNoNotice : public Module return MOD_RES_PASSTHRU; } - virtual ~ModuleNoNotice() - { - } - - virtual Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Provides channel mode +T to block notices to the channel", VF_VENDOR); }