summaryrefslogtreecommitdiff
path: root/src/modules/m_botmode.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-04-28 15:16:22 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-04-28 15:16:22 +0200
commit8f34594cb7d600ccff100dff1817b69b03756ea2 (patch)
treefecbd61c35bd75add033a71b42043a0c99624c99 /src/modules/m_botmode.cpp
parent04eb0e182dec8518d1dfd15a09b8054d1501a4ef (diff)
Move OnWhois* events to core_whois, add Whois::Context
Remove InspIRCd::SendWhoisLine()
Diffstat (limited to 'src/modules/m_botmode.cpp')
-rw-r--r--src/modules/m_botmode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp
index 56c94c7c7..419af0153 100644
--- a/src/modules/m_botmode.cpp
+++ b/src/modules/m_botmode.cpp
@@ -29,12 +29,13 @@ class BotMode : public SimpleUserModeHandler
BotMode(Module* Creator) : SimpleUserModeHandler(Creator, "bot", 'B') { }
};
-class ModuleBotMode : public Module
+class ModuleBotMode : public Module, public Whois::EventListener
{
BotMode bm;
public:
ModuleBotMode()
- : bm(this)
+ : Whois::EventListener(this)
+ , bm(this)
{
}
@@ -43,11 +44,11 @@ class ModuleBotMode : public Module
return Version("Provides user mode +B to mark the user as a bot",VF_VENDOR);
}
- void OnWhois(User* src, User* dst) CXX11_OVERRIDE
+ void OnWhois(Whois::Context& whois) CXX11_OVERRIDE
{
- if (dst->IsModeSet(bm))
+ if (whois.GetTarget()->IsModeSet(bm))
{
- ServerInstance->SendWhoisLine(src, dst, 335, ":is a bot on "+ServerInstance->Config->Network);
+ whois.SendLine(335, ":is a bot on " + ServerInstance->Config->Network);
}
}
};