summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/xmpp_component.cpp13
-rw-r--r--src/xmpp/xmpp_component.hpp7
2 files changed, 18 insertions, 2 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];
diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp
index 17462f4..ac12e40 100644
--- a/src/xmpp/xmpp_component.hpp
+++ b/src/xmpp/xmpp_component.hpp
@@ -104,7 +104,8 @@ public:
*/
void send_stanza_error(const std::string& kind, const std::string& to, const std::string& from,
const std::string& id, const std::string& error_type,
- const std::string& defined_condition, const std::string& text);
+ const std::string& defined_condition, const std::string& text,
+ const bool fulljid=true);
/**
* Send the closing signal for our document (not closing the connection though).
*/
@@ -209,6 +210,10 @@ public:
void send_iq_version_request(const std::string& from,
const std::string& jid_to);
/**
+ * Send an empty iq of type result
+ */
+ void send_iq_result(const std::string& id, const std::string& to_jid, const std::string& from);
+ /**
* Handle the various stanza types
*/
void handle_handshake(const Stanza& stanza);