diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-04-25 00:53:08 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-04-25 00:53:08 +0200 |
commit | 4e61b0d57e4e0a127b8b8db2dab6452695ff425c (patch) | |
tree | cac712d65eeb1cb3ddc475d18af14b800f396bff | |
parent | 77a84fd2d99bcffd562f09c8235e5bcd365accb1 (diff) | |
download | biboumi-4e61b0d57e4e0a127b8b8db2dab6452695ff425c.tar.gz biboumi-4e61b0d57e4e0a127b8b8db2dab6452695ff425c.tar.bz2 biboumi-4e61b0d57e4e0a127b8b8db2dab6452695ff425c.tar.xz biboumi-4e61b0d57e4e0a127b8b8db2dab6452695ff425c.zip |
The author name from messages from the server are now nicely formated
-rw-r--r-- | src/bridge/bridge.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index a2f481c..12a56d7 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -241,7 +241,12 @@ void Bridge::send_xmpp_message(const std::string& from, const std::string& autho { std::string body; if (!author.empty()) - body = std::string("[") + author + std::string("] ") + msg; + { + IrcUser user(author); + body = std::string("\u000303") + user.nick + (user.host.empty()? + std::string("\u0003: "): + (" (\u000310" + user.host + std::string("\u000303)\u0003: "))) + msg; + } else body = msg; this->xmpp->send_message(from, this->make_xmpp_body(body), this->user_jid, "chat"); |