summaryrefslogtreecommitdiff
path: root/src/bridge/bridge.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-11-12 08:10:46 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-11-12 08:14:56 +0100
commit12eeb4d11eee5b8e6514f0ce8bf7508cc2d6d7a1 (patch)
tree386b8579941d2452ac956e7644da161af6942980 /src/bridge/bridge.cpp
parent80789c2e927e90b025f26951ed1bbbde25d5eb0f (diff)
downloadbiboumi-12eeb4d11eee5b8e6514f0ce8bf7508cc2d6d7a1.tar.gz
biboumi-12eeb4d11eee5b8e6514f0ce8bf7508cc2d6d7a1.tar.bz2
biboumi-12eeb4d11eee5b8e6514f0ce8bf7508cc2d6d7a1.tar.xz
biboumi-12eeb4d11eee5b8e6514f0ce8bf7508cc2d6d7a1.zip
Implement the PING on a server or the gateway itself
fix #2575
Diffstat (limited to 'src/bridge/bridge.cpp')
-rw-r--r--src/bridge/bridge.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index ed61c6b..a7d8fe6 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -355,6 +355,17 @@ void Bridge::send_irc_participant_ping_request(const Iid& iid, const std::string
this->send_irc_user_ping_request(iid.get_server(), nick, iq_id, to_jid, from_jid);
}
+void Bridge::on_gateway_ping(const std::string& irc_hostname, const std::string& iq_id, const std::string& to_jid,
+ const std::string& from_jid)
+{
+ Jid jid(from_jid);
+ if (irc_hostname.empty() || this->get_irc_client(irc_hostname))
+ this->xmpp->send_iq_result(iq_id, to_jid, jid.local);
+ else
+ this->xmpp->send_stanza_error("iq", to_jid, from_jid, iq_id, "cancel", "service-unavailable",
+ "", true);
+}
+
void Bridge::send_irc_version_request(const std::string& irc_hostname, const std::string& target,
const std::string& iq_id, const std::string& to_jid,
const std::string& from_jid)