diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-06-19 22:22:29 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-06-19 22:22:29 +0200 |
commit | 2117838cf9fb083f6f74386abbb56e3b28d4db46 (patch) | |
tree | a70c1d2a9522b04ff9a66ae2e91441f1372455df /src/xmpp/xmpp_component.cpp | |
parent | 26ffc8fe121e03e1b663aa0015a71b0fc914f95e (diff) | |
download | biboumi-2117838cf9fb083f6f74386abbb56e3b28d4db46.tar.gz biboumi-2117838cf9fb083f6f74386abbb56e3b28d4db46.tar.bz2 biboumi-2117838cf9fb083f6f74386abbb56e3b28d4db46.tar.xz biboumi-2117838cf9fb083f6f74386abbb56e3b28d4db46.zip |
Return a proper iq when the IRC server responds to our kick
A result or an error, depending on the type of message
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 901e168..5ecb283 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -468,7 +468,7 @@ void XmppComponent::handle_iq(const Stanza& stanza) if (reason_el) reason = reason_el->get_inner(); Iid iid(to.local); - bridge->send_irc_kick(iid, nick, reason); + bridge->send_irc_kick(iid, nick, reason, id, from); stanza_error.disable(); } } @@ -1014,6 +1014,17 @@ void XmppComponent::send_iq_version_request(const std::string& from, this->send_stanza(iq); } +void XmppComponent::send_iq_result(const std::string& id, const std::string& to_jid, const std::string& from_local_part) +{ + Stanza iq("iq"); + iq["from"] = from_local_part + "@" + this->served_hostname; + iq["to"] = to_jid; + iq["id"] = id; + iq["type"] = "result"; + iq.close(); + this->send_stanza(iq); +} + std::string XmppComponent::next_id() { char uuid_str[37]; |