aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_ircv3.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-11-16 16:29:12 +0000
committerGravatar Sadie Powell2022-11-16 16:29:12 +0000
commit92739a57f6020f07fcc27b80f19869bd85369dcb (patch)
treea1c19b2ee89521c2ecb023ad8920491ddd82adfc /src/modules/m_ircv3.cpp
parentRelease v4.0.0 alpha 16. (diff)
parentUpdate the Windows dependencies. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_ircv3.cpp')
-rw-r--r--src/modules/m_ircv3.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp
index a961dbffa..ff5301010 100644
--- a/src/modules/m_ircv3.cpp
+++ b/src/modules/m_ircv3.cpp
@@ -24,6 +24,7 @@
#include "modules/away.h"
#include "modules/cap.h"
#include "modules/ircv3.h"
+#include "modules/monitor.h"
class AwayMessage final
: public ClientProtocol::Message
@@ -124,6 +125,7 @@ private:
Cap::Capability cap_accountnotify;
JoinHook joinhook;
ClientProtocol::EventProvider accountprotoev;
+ Monitor::API monitorapi;
public:
ModuleIRCv3()
@@ -133,6 +135,7 @@ public:
, cap_accountnotify(this, "account-notify")
, joinhook(this)
, accountprotoev(this, "ACCOUNT")
+ , monitorapi(this)
{
}
@@ -155,7 +158,8 @@ public:
const std::string& param = (newaccount.empty() ? joinhook.asterisk : newaccount);
msg.PushParamRef(param);
ClientProtocol::Event accountevent(accountprotoev, msg);
- IRCv3::WriteNeighborsWithCap(user, accountevent, cap_accountnotify, true);
+ IRCv3::WriteNeighborsWithCap res(user, accountevent, cap_accountnotify, true);
+ Monitor::WriteWatchersWithCap(monitorapi, user, accountevent, cap_accountnotify, res.GetAlreadySentId());
}
void OnUserAway(User* user) override
@@ -166,7 +170,8 @@ public:
// Going away: n!u@h AWAY :reason
AwayMessage msg(user);
ClientProtocol::Event awayevent(joinhook.awayprotoev, msg);
- IRCv3::WriteNeighborsWithCap(user, awayevent, joinhook.awaycap);
+ IRCv3::WriteNeighborsWithCap res(user, awayevent, joinhook.awaycap);
+ Monitor::WriteWatchersWithCap(monitorapi, user, awayevent, joinhook.awaycap, res.GetAlreadySentId());
}
void OnUserBack(User* user) override