X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_servprotect.cpp;h=0445235dc795f6821de7853ee98c0fae38b5fc89;hb=72555992d16af9a1ca28ada1dc70591fb7653dfe;hp=2ed37b9e4e28a6405851bfda85b0ac1a9bdd8cb3;hpb=6fe1f4e1136f2ab95a88e68af1894bf6002d03f4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 2ed37b9e4..0445235dc 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -42,12 +42,13 @@ class ServProtectMode : public ModeHandler } }; -class ModuleServProtectMode : public Module, public Whois::EventListener +class ModuleServProtectMode : public Module, public Whois::EventListener, public Whois::LineEventListener { ServProtectMode bm; public: ModuleServProtectMode() : Whois::EventListener(this) + , Whois::LineEventListener(this) , bm(this) { } @@ -120,9 +121,9 @@ class ModuleServProtectMode : public Module, public Whois::EventListener return MOD_RES_PASSTHRU; } - ModResult OnWhoisLine(User* src, User* dst, int &numeric, std::string &text) CXX11_OVERRIDE + ModResult OnWhoisLine(Whois::Context& whois, unsigned int& numeric, std::string& text) CXX11_OVERRIDE { - return ((numeric == 319) && dst->IsModeSet(bm)) ? MOD_RES_DENY : MOD_RES_PASSTHRU; + return ((numeric == 319) && whois.GetTarget()->IsModeSet(bm)) ? MOD_RES_DENY : MOD_RES_PASSTHRU; } };