diff options
| author | 2018-08-13 20:17:46 +0100 | |
|---|---|---|
| committer | 2018-08-13 21:51:11 +0100 | |
| commit | 58a0a7e01422e62de1565a8eb0a1febdc463d04d (patch) | |
| tree | 8861789deefe9df3524690de8ccd11e5366f1f2e /src/modules/m_ircv3_invitenotify.cpp | |
| parent | Add an accessor for the last mode change list to ModeParser. (diff) | |
Implement IRCv3 message tag support.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
Diffstat (limited to 'src/modules/m_ircv3_invitenotify.cpp')
| -rw-r--r-- | src/modules/m_ircv3_invitenotify.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_ircv3_invitenotify.cpp b/src/modules/m_ircv3_invitenotify.cpp index 3783ff33c..bcb6f51d5 100644 --- a/src/modules/m_ircv3_invitenotify.cpp +++ b/src/modules/m_ircv3_invitenotify.cpp @@ -32,8 +32,8 @@ class ModuleIRCv3InviteNotify : public Module void OnUserInvite(User* source, User* dest, Channel* chan, time_t expiry, unsigned int notifyrank, CUList& notifyexcepts) CXX11_OVERRIDE { - std::string msg = "INVITE "; - msg.append(dest->nick).append(1, ' ').append(chan->name); + ClientProtocol::Messages::Invite invitemsg(source, dest, chan); + ClientProtocol::Event inviteevent(ServerInstance->GetRFCEvents().invite, invitemsg); const Channel::MemberMap& users = chan->GetUsers(); for (Channel::MemberMap::const_iterator i = users.begin(); i != users.end(); ++i) { @@ -47,8 +47,10 @@ class ModuleIRCv3InviteNotify : public Module if (memb->getRank() < notifyrank) continue; + // Caps are only set on local users + LocalUser* const localuser = static_cast<LocalUser*>(user); // Send and add the user to the exceptions so they won't get the NOTICE invite announcement message - user->WriteFrom(source, msg); + localuser->Send(inviteevent); notifyexcepts.insert(user); } } |
