From bb596582bd2d8b9aab3fe08e76a7d24d82bf614a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 12 Mar 2018 00:04:26 +0100 Subject: Add a node in the presence of a leaving participant fix #3339 --- src/bridge/bridge.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index c2f0233..44df4c2 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -170,7 +170,7 @@ public: /** * Send an unavailable presence from this participant */ - void send_muc_leave(const Iid& iid, const std::string& nick, + void send_muc_leave(const Iid& iid, const IrcUser& nick, const std::string& message, const bool self, const bool user_requested, const std::string& resource=""); -- cgit v1.2.3 From 9500bfd4ccb21b261fd8204180d78553704f7acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 18 Mar 2018 19:33:07 +0100 Subject: Reflect message IDs in channel MUCs fix #3283 --- src/bridge/bridge.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index 44df4c2..3798465 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -77,7 +77,7 @@ public: */ bool join_irc_channel(const Iid& iid, const std::string& nickname, const std::string& password, const std::string& resource, HistoryLimit history_limit); - void send_channel_message(const Iid& iid, const std::string& body); + void send_channel_message(const Iid& iid, const std::string& body, std::string id); void send_private_message(const Iid& iid, const std::string& body, const std::string& type="PRIVMSG"); void send_raw_message(const std::string& hostname, const std::string& body); void leave_irc_channel(Iid&& iid, const std::string& status_message, const std::string& resource); -- cgit v1.2.3 From 619c991a691a455efee2baa4e1fe96e64d27ff64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 19 Mar 2018 20:08:35 +0100 Subject: Add a nick field in the IRC server configuration form fix #3317 --- src/bridge/bridge.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index 3798465..a4ee693 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -75,7 +75,7 @@ public: * Try to join an irc_channel, does nothing and return true if the channel * was already joined. */ - bool join_irc_channel(const Iid& iid, const std::string& nickname, const std::string& password, const std::string& resource, HistoryLimit history_limit); + bool join_irc_channel(const Iid& iid, std::string nickname, const std::string& password, const std::string& resource, HistoryLimit history_limit); void send_channel_message(const Iid& iid, const std::string& body, std::string id); void send_private_message(const Iid& iid, const std::string& body, const std::string& type="PRIVMSG"); -- cgit v1.2.3 From faa33c1a712f98de4bafee821bde7eb270bbb7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 22 Mar 2018 20:44:30 +0100 Subject: Pass an IrcClient* to send_muc_leave instead of doing an other search --- src/bridge/bridge.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index a4ee693..a190739 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -173,7 +173,8 @@ public: void send_muc_leave(const Iid& iid, const IrcUser& nick, const std::string& message, const bool self, const bool user_requested, - const std::string& resource=""); + const std::string& resource, + const IrcClient* client); /** * Send presences to indicate that an user old_nick (ourself if self == * true) changed his nick to new_nick. The user_mode is needed because -- cgit v1.2.3 From e2fc3cf68e1dc145e75fe67f2543765ff00ba839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 23 Mar 2018 16:16:30 +0100 Subject: Properly handle force-join presences by sending everything in return fix #3305 --- src/bridge/bridge.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index a190739..8e7d9d7 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -75,7 +75,11 @@ public: * Try to join an irc_channel, does nothing and return true if the channel * was already joined. */ - bool join_irc_channel(const Iid& iid, std::string nickname, const std::string& password, const std::string& resource, HistoryLimit history_limit); + bool join_irc_channel(const Iid& iid, std::string nickname, + const std::string& password, + const std::string& resource, + HistoryLimit history_limit, + const bool force_join); void send_channel_message(const Iid& iid, const std::string& body, std::string id); void send_private_message(const Iid& iid, const std::string& body, const std::string& type="PRIVMSG"); -- cgit v1.2.3 From 21a79b7bad51e755cee2890aa6d0bec5dd45f901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 19 Jun 2018 21:31:11 +0200 Subject: Reject messages from unjoined resources, with an error fix #3346 --- src/bridge/bridge.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index 8e7d9d7..04397c6 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -316,7 +316,9 @@ private: */ void add_resource_to_chan(const ChannelKey& channel, const std::string& resource); void remove_resource_from_chan(const ChannelKey& channel, const std::string& resource); +public: bool is_resource_in_chan(const ChannelKey& channel, const std::string& resource) const; +private: void remove_all_resources_from_chan(const ChannelKey& channel); std::size_t number_of_resources_in_chan(const ChannelKey& channel) const; -- cgit v1.2.3 From 0b8738d87aa101117c7681ade41f8527ad515d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 22 Jun 2018 21:33:58 +0200 Subject: Archive the Mode messages, except if they are received for an unjoined chan fix #3362 --- src/bridge/bridge.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index 04397c6..cb48a96 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -166,7 +166,7 @@ public: /** * Send a MUC message from some participant */ - void send_message(const Iid& iid, const std::string& nick, const std::string& body, const bool muc); + void send_message(const Iid& iid, const std::string& nick, const std::string& body, const bool muc, const bool log=true); /** * Send a presence of type error, from a room. */ -- cgit v1.2.3 From 248e25c22fc15105d2a9db695ddb93ed5a8e0802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 26 Aug 2018 15:41:54 +0200 Subject: Replace a useless shared_ptr by a unique_ptr --- src/bridge/bridge.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index cb48a96..b2f7734 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -241,8 +241,8 @@ public: * iq_responder_callback_t and remove the callback from the list. */ void trigger_on_irc_message(const std::string& irc_hostname, const IrcMessage& message); - std::unordered_map>& get_irc_clients(); - const std::unordered_map>& get_irc_clients() const; + std::unordered_map>& get_irc_clients(); + const std::unordered_map>& get_irc_clients() const; std::set get_chantypes(const std::string& hostname) const; #ifdef USE_DATABASE void set_record_history(const bool val); @@ -275,7 +275,7 @@ private: * One IrcClient for each IRC server we need to be connected to. * The pointer is shared by the bridge and the poller. */ - std::unordered_map> irc_clients; + std::unordered_map> irc_clients; /** * To communicate back with the XMPP component */ -- cgit v1.2.3 From b9f6fbd8405c1d16ca637fb32850d44173528e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 26 Aug 2018 18:08:14 +0200 Subject: Remove an unused function (and a useless debug log) --- src/bridge/bridge.hpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index b2f7734..5c547ff 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -324,7 +324,6 @@ private: void add_resource_to_server(const IrcHostname& irc_hostname, const std::string& resource); void remove_resource_from_server(const IrcHostname& irc_hostname, const std::string& resource); - bool is_resource_in_server(const IrcHostname& irc_hostname, const std::string& resource) const; size_t number_of_channels_the_resource_is_in(const std::string& irc_hostname, const std::string& resource) const; /** -- cgit v1.2.3