diff options
Diffstat (limited to 'src/modules/m_servprotect.cpp')
| -rw-r--r-- | src/modules/m_servprotect.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index edad324d1..2ed37b9e4 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 +class ModuleServProtectMode : public Module, public Whois::EventListener { ServProtectMode bm; public: ModuleServProtectMode() - : bm(this) + : Whois::EventListener(this) + , bm(this) { } @@ -56,11 +57,11 @@ class ModuleServProtectMode : public Module return Version("Provides usermode +k to protect services from kicks, kills, and mode changes.", VF_VENDOR); } - void OnWhois(User* user, User* dest) CXX11_OVERRIDE + void OnWhois(Whois::Context& whois) CXX11_OVERRIDE { - if (dest->IsModeSet(bm)) + if (whois.GetTarget()->IsModeSet(bm)) { - ServerInstance->SendWhoisLine(user, dest, 310, ":is a Network Service on "+ServerInstance->Config->Network); + whois.SendLine(310, ":is a Network Service on " + ServerInstance->Config->Network); } } |
