summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-11-02 21:25:26 +0100
committerlouiz’ <louiz@louiz.org>2016-11-02 21:25:26 +0100
commitc70301e503fdb887387a54fcf5284d593e65d837 (patch)
treec50b1b67454fa010dabb129f9b5de84e2b3f93b6 /src/bridge
parentf50f50653dc064575e4730c31b5615301f00e057 (diff)
downloadbiboumi-c70301e503fdb887387a54fcf5284d593e65d837.tar.gz
biboumi-c70301e503fdb887387a54fcf5284d593e65d837.tar.bz2
biboumi-c70301e503fdb887387a54fcf5284d593e65d837.tar.xz
biboumi-c70301e503fdb887387a54fcf5284d593e65d837.zip
Fix the presences sent, when multiple resources join the virtual channel
fix #3216
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 67eb805..a0ecc6e 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -177,16 +177,23 @@ bool Bridge::join_irc_channel(const Iid& iid, const std::string& nickname, const
{ // Join the dummy channel
if (irc->is_welcomed())
{
- if (irc->get_dummy_channel().joined)
+ if (res_in_chan)
return false;
// Immediately simulate a message coming from the IRC server saying that we
// joined the channel
- const IrcMessage join_message(irc->get_nick(), "JOIN", {""});
- irc->on_channel_join(join_message);
- const IrcMessage end_join_message(std::string(iid.get_server()), "366",
- {irc->get_nick(),
- "", "End of NAMES list"});
- irc->on_channel_completely_joined(end_join_message);
+ if (irc->get_dummy_channel().joined)
+ {
+ this->generate_channel_join_for_resource(iid, resource);
+ }
+ else
+ {
+ const IrcMessage join_message(irc->get_nick(), "JOIN", {""});
+ irc->on_channel_join(join_message);
+ const IrcMessage end_join_message(std::string(iid.get_server()), "366",
+ {irc->get_nick(),
+ "", "End of NAMES list"});
+ irc->on_channel_completely_joined(end_join_message);
+ }
}
else
{