diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-28 15:16:22 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-28 15:16:22 +0200 |
commit | 8f34594cb7d600ccff100dff1817b69b03756ea2 (patch) | |
tree | fecbd61c35bd75add033a71b42043a0c99624c99 /src/modules/m_servprotect.cpp | |
parent | 04eb0e182dec8518d1dfd15a09b8054d1501a4ef (diff) |
Move OnWhois* events to core_whois, add Whois::Context
Remove InspIRCd::SendWhoisLine()
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); } } |