summaryrefslogtreecommitdiff
path: root/src/irc/irc_client.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-21 00:37:01 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-21 00:37:01 +0100
commit70a58a8f7152e775a1c6cdc15b3c9f23a7719f85 (patch)
treed37b7a377c3f76a2e51fe2dcebb2b19874773872 /src/irc/irc_client.cpp
parente7a441e798e0a32fc4bb4021e058f3dc080adc80 (diff)
parentb72908548dc841de65dc9288a96c1abe648acc46 (diff)
downloadbiboumi-70a58a8f7152e775a1c6cdc15b3c9f23a7719f85.tar.gz
biboumi-70a58a8f7152e775a1c6cdc15b3c9f23a7719f85.tar.bz2
biboumi-70a58a8f7152e775a1c6cdc15b3c9f23a7719f85.tar.xz
biboumi-70a58a8f7152e775a1c6cdc15b3c9f23a7719f85.zip
Merge branch 'epolletc'
Diffstat (limited to 'src/irc/irc_client.cpp')
-rw-r--r--src/irc/irc_client.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index 82abbd9..f339580 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -222,6 +222,27 @@ void IrcClient::on_channel_message(const IrcMessage& message)
this->bridge->send_message(iid, nick, body, muc);
}
+void IrcClient::empty_motd(const IrcMessage& message)
+{
+ (void)message;
+ this->motd.erase();
+}
+
+void IrcClient::on_motd_line(const IrcMessage& message)
+{
+ const std::string body = message.arguments[1];
+ // We could send the MOTD without a line break between each IRC-message,
+ // but sometimes it contains some ASCII art, we use line breaks to keep
+ // them intact.
+ this->motd += body+"\n";
+}
+
+void IrcClient::send_motd(const IrcMessage& message)
+{
+ (void)message;
+ this->bridge->send_xmpp_message(this->hostname, "", this->motd);
+}
+
void IrcClient::on_topic_received(const IrcMessage& message)
{
const std::string chan_name = message.arguments[1];