aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_watch.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-01-05 14:41:06 +0000
committerGravatar Sadie Powell2020-01-05 14:41:06 +0000
commitf8013e089955329bbf915c1617f668618533c266 (patch)
tree6244df0adc4dea3e2fd9af4158648d7d4bac9d03 /src/modules/m_watch.cpp
parentMerge branch 'insp3' into master. (diff)
Move ISupport logic out of the core and into core_info.
Diffstat (limited to 'src/modules/m_watch.cpp')
-rw-r--r--src/modules/m_watch.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index f03f1b5a3..e45f720dd 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -19,6 +19,7 @@
#include "inspircd.h"
#include "modules/away.h"
+#include "modules/isupport.h"
#define INSPIRCD_MONITOR_MANAGER_ONLY
#include "m_monitor.cpp"
@@ -183,7 +184,9 @@ class CommandWatch : public SplitCommand
class ModuleWatch
: public Module
, public Away::EventListener
+ , public ISupport::EventListener
{
+ private:
IRCv3::Monitor::Manager manager;
CommandWatch cmd;
@@ -215,6 +218,7 @@ class ModuleWatch
public:
ModuleWatch()
: Away::EventListener(this)
+ , ISupport::EventListener(this)
, manager(this, "watch")
, cmd(this, manager)
{
@@ -259,7 +263,7 @@ class ModuleWatch
SendAlert(user, user->nick, RPL_NOTAWAY, "is no longer away", ServerInstance->Time());
}
- void On005Numeric(std::map<std::string, std::string>& tokens) override
+ void OnBuildISupport(ISupport::TokenMap& tokens) override
{
tokens["WATCH"] = ConvToStr(cmd.maxwatch);
}