summaryrefslogtreecommitdiff
path: root/src/bridge/bridge.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-03-09 17:37:49 +0100
committerlouiz’ <louiz@louiz.org>2017-03-27 11:49:07 +0200
commit55f74349259fa0037de98d30d70b50396c4804f5 (patch)
tree7b45e37de97c881c7587e126596a6d6f202e38a7 /src/bridge/bridge.cpp
parentb7789fe586f375f09134a0817bd3ac19850c048f (diff)
downloadbiboumi-55f74349259fa0037de98d30d70b50396c4804f5.tar.gz
biboumi-55f74349259fa0037de98d30d70b50396c4804f5.tar.bz2
biboumi-55f74349259fa0037de98d30d70b50396c4804f5.tar.xz
biboumi-55f74349259fa0037de98d30d70b50396c4804f5.zip
Do not remove our resources if the QUIT message doesn't come from us
Diffstat (limited to 'src/bridge/bridge.cpp')
-rw-r--r--src/bridge/bridge.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index d033acc..4632c23 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -881,11 +881,12 @@ void Bridge::send_muc_leave(Iid&& iid, std::string&& nick, const std::string& me
for (const auto &res: this->resources_in_chan[iid.to_tuple()])
this->xmpp.send_muc_leave(std::to_string(iid), std::move(nick), this->make_xmpp_body(message),
this->user_jid + "/" + res, self);
- this->remove_all_resources_from_chan(iid.to_tuple());
+ if (self)
+ this->remove_all_resources_from_chan(iid.to_tuple());
}
IrcClient* irc = this->find_irc_client(iid.get_server());
- if (irc && irc->number_of_joined_channels() == 0)
+ if (self && irc && irc->number_of_joined_channels() == 0)
this->quit_or_start_linger_timer(iid.get_server());
}