diff options
| author | 2015-04-28 15:16:22 +0200 | |
|---|---|---|
| committer | 2015-04-28 15:16:22 +0200 | |
| commit | 8f34594cb7d600ccff100dff1817b69b03756ea2 (patch) | |
| tree | fecbd61c35bd75add033a71b42043a0c99624c99 /src/modules/m_helpop.cpp | |
| parent | Prepend target user nick to whois numerics in InspIRCd::SendWhoisLine() (diff) | |
| download | inspircd++-8f34594cb7d600ccff100dff1817b69b03756ea2.tar.gz inspircd++-8f34594cb7d600ccff100dff1817b69b03756ea2.tar.bz2 inspircd++-8f34594cb7d600ccff100dff1817b69b03756ea2.zip | |
Move OnWhois* events to core_whois, add Whois::Context
Remove InspIRCd::SendWhoisLine()
Diffstat (limited to 'src/modules/m_helpop.cpp')
| -rw-r--r-- | src/modules/m_helpop.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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."); } } |
