From 1d2f20600a937cd00181a2fad055cd9bb56f058e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 31 Oct 2016 01:38:26 +0100 Subject: Handle IRC message 341 (invite confirmation) --- src/irc/irc_client.cpp | 9 +++++++++ src/irc/irc_client.hpp | 4 ++++ 2 files changed, 13 insertions(+) (limited to 'src/irc') diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 6a87b99..033671e 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -46,6 +46,7 @@ static const std::unordered_mapmotd.erase(); } +void IrcClient::on_invited(const IrcMessage& message) +{ + const std::string& chan_name = message.arguments[2]; + const std::string& invited_nick = message.arguments[1]; + + this->bridge.send_xmpp_message(this->hostname, "", invited_nick + " has been invited to " + chan_name); +} + void IrcClient::on_empty_topic(const IrcMessage& message) { const std::string chan_name = utils::tolower(message.arguments[1]); diff --git a/src/irc/irc_client.hpp b/src/irc/irc_client.hpp index 9f53c3c..1b4d892 100644 --- a/src/irc/irc_client.hpp +++ b/src/irc/irc_client.hpp @@ -213,6 +213,10 @@ public: * Empty the topic */ void on_empty_topic(const IrcMessage& message); + /** + * The IRC server is confirming that the invitation has been forwarded + */ + void on_invited(const IrcMessage& message); /** * The channel has been completely joined (self presence, topic, all names * received etc), send the self presence and topic to the XMPP user. -- cgit v1.2.3