summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-08-17 03:42:40 +0200
committerlouiz’ <louiz@louiz.org>2016-08-18 20:33:41 +0200
commit4c8fb9a0e314db88dec1f105144aadafc5796ef2 (patch)
tree4d374079d1ff718187502c9a68df8fe8607efb54 /src/bridge
parent5406de35a39c935a19460da06bf3dcd3948a00d5 (diff)
downloadbiboumi-4c8fb9a0e314db88dec1f105144aadafc5796ef2.tar.gz
biboumi-4c8fb9a0e314db88dec1f105144aadafc5796ef2.tar.bz2
biboumi-4c8fb9a0e314db88dec1f105144aadafc5796ef2.tar.xz
biboumi-4c8fb9a0e314db88dec1f105144aadafc5796ef2.zip
Forward IRC invites to XMPP
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp6
-rw-r--r--src/bridge/bridge.hpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index f6fefd9..f69da77 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -798,6 +798,12 @@ void Bridge::send_xmpp_ping_request(const std::string& nick, const std::string&
this->xmpp.send_ping_request(utils::tolower(nick) + "%" + utils::empty_if_fixed_server(hostname), this->user_jid + "/" + *resources.begin(), utils::revstr(id));
}
+void Bridge::send_xmpp_invitation(const Iid& iid, const std::string& author)
+{
+ for (const auto& resource: this->resources_in_server[iid.get_server()])
+ this->xmpp.send_invitation(std::to_string(iid), this->user_jid + "/" + resource, author);
+}
+
void Bridge::set_preferred_from_jid(const std::string& nick, const std::string& full_jid)
{
auto it = this->preferred_user_from.find(nick);
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index bcad030..6fdbcc9 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -175,6 +175,8 @@ public:
*/
void send_xmpp_ping_request(const std::string& nick, const std::string& hostname,
const std::string& id);
+ void send_xmpp_invitation(const Iid& iid, const std::string& author);
+
/**
* Misc
*/