summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-28 00:55:20 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-28 01:18:26 +0100
commit61ecaab40078901800e3e20282f1ae7852a7c938 (patch)
treee7fac37dd639859e61e02e0e9b4d30435c86f700
parent3c5cdec1d11fc03899f7068279cf5430d274124c (diff)
downloadbiboumi-61ecaab40078901800e3e20282f1ae7852a7c938.tar.gz
biboumi-61ecaab40078901800e3e20282f1ae7852a7c938.tar.bz2
biboumi-61ecaab40078901800e3e20282f1ae7852a7c938.tar.xz
biboumi-61ecaab40078901800e3e20282f1ae7852a7c938.zip
Re-add support for /me messages from IRC
It was recently removed because it was handled in the old "convert irc colors" code. It now is in the right place.
-rw-r--r--src/irc/irc_client.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index f339580..72eec02 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -219,7 +219,14 @@ void IrcClient::on_channel_message(const IrcMessage& message)
iid.chan = nick;
muc = false;
}
- this->bridge->send_message(iid, nick, body, muc);
+ if (!body.empty() && body[0] == '\01')
+ {
+ if (body.substr(1, 6) == "ACTION")
+ this->bridge->send_message(iid, nick,
+ std::string("/me") + body.substr(7, body.size() - 8), muc);
+ }
+ else
+ this->bridge->send_message(iid, nick, body, muc);
}
void IrcClient::empty_motd(const IrcMessage& message)