From 8f34594cb7d600ccff100dff1817b69b03756ea2 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 28 Apr 2015 15:16:22 +0200 Subject: Move OnWhois* events to core_whois, add Whois::Context Remove InspIRCd::SendWhoisLine() --- src/modules/m_helpop.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules/m_helpop.cpp') diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 4c0af15af..ef9ae5e22 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -94,14 +94,16 @@ class CommandHelpop : public Command } }; -class ModuleHelpop : public Module +class ModuleHelpop : public Module, public Whois::EventListener { CommandHelpop cmd; Helpop ho; public: ModuleHelpop() - : cmd(this), ho(this) + : Whois::EventListener(this) + , cmd(this) + , ho(this) { } @@ -139,11 +141,11 @@ class ModuleHelpop : public Module helpop_map.swap(help); } - void OnWhois(User* src, User* dst) CXX11_OVERRIDE + void OnWhois(Whois::Context& whois) CXX11_OVERRIDE { - if (dst->IsModeSet(ho)) + if (whois.GetTarget()->IsModeSet(ho)) { - ServerInstance->SendWhoisLine(src, dst, 310, ":is available for help."); + whois.SendLine(310, ":is available for help."); } } -- cgit v1.3.1-10-gc9f91