diff options
| author | 2015-06-02 20:05:00 +0200 | |
|---|---|---|
| committer | 2015-06-02 20:05:00 +0200 | |
| commit | 61696290a6ba5a2a862a0fa43508767886da3497 (patch) | |
| tree | d8e74bf34c8b35b8e1baae1d0b864b1f8f60de1a /src/modules/m_servprotect.cpp | |
| parent | m_spanningtree Log nick collisions more verbosely and in all cases (diff) | |
Fix incomplete conversion to the new whois system noticed by @SaberUK
Diffstat (limited to 'src/modules/m_servprotect.cpp')
| -rw-r--r-- | src/modules/m_servprotect.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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; } }; |
