aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_setname.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_setname.cpp')
-rw-r--r--src/modules/m_setname.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index 884edabec..352b3bff2 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -26,6 +26,7 @@
#include "inspircd.h"
#include "modules/ircv3.h"
#include "modules/ircv3_replies.h"
+#include "modules/monitor.h"
class CommandSetName final
: public SplitCommand
@@ -72,12 +73,14 @@ class ModuleSetName final
private:
CommandSetName cmd;
ClientProtocol::EventProvider setnameevprov;
+ Monitor::API monitorapi;
public:
ModuleSetName()
: Module(VF_VENDOR, "Adds the /SETNAME command which allows users to change their real name.")
, cmd(this)
, setnameevprov(this, "SETNAME")
+ , monitorapi(this)
{
}
@@ -101,7 +104,8 @@ public:
ClientProtocol::Message msg("SETNAME", user);
msg.PushParamRef(real);
ClientProtocol::Event protoev(setnameevprov, msg);
- IRCv3::WriteNeighborsWithCap(user, protoev, cmd.cap, true);
+ IRCv3::WriteNeighborsWithCap res(user, protoev, cmd.cap, true);
+ Monitor::WriteWatchersWithCap(monitorapi, user, protoev, cmd.cap, res.GetAlreadySentId());
}
};