diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-05-07 17:01:17 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-05-07 17:01:17 +0200 |
commit | 0a6b673b14efc4f623ea445045e6fc60e9842a25 (patch) | |
tree | 88fef4dced68ef3c616fe1575d5c542b0474b56a /src/bridge/bridge.cpp | |
parent | e24ed4f70c22142029fa8e6cf5b874e8bc261bc3 (diff) | |
download | biboumi-0a6b673b14efc4f623ea445045e6fc60e9842a25.tar.gz biboumi-0a6b673b14efc4f623ea445045e6fc60e9842a25.tar.bz2 biboumi-0a6b673b14efc4f623ea445045e6fc60e9842a25.tar.xz biboumi-0a6b673b14efc4f623ea445045e6fc60e9842a25.zip |
Support raw IRC messages
Messages received on an IRC server JID are forwarded as raw IRC messages.
fix #2486
Diffstat (limited to 'src/bridge/bridge.cpp')
-rw-r--r-- | src/bridge/bridge.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 85049b9..45cdc01 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -273,6 +273,17 @@ void Bridge::send_private_message(const Iid& iid, const std::string& body, const } } +void Bridge::send_raw_message(const std::string& hostname, const std::string& body) +{ + IrcClient* irc = this->get_irc_client(hostname); + if (!irc) + { + log_warning("Cannot send message: no client exist for server " << hostname); + return ; + } + irc->send_raw(body); +} + void Bridge::leave_irc_channel(Iid&& iid, std::string&& status_message) { IrcClient* irc = this->get_irc_client(iid.get_server()); |