Don’t send the unavailable presence to all resources, in the virtual channel

This commit is contained in:
louiz’
2017-03-08 22:09:57 +01:00
parent 27195a9dd4
commit 38ff50f5d2
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ void Bridge::shutdown(const std::string& exit_message)
for (auto it = this->irc_clients.begin(); it != this->irc_clients.end(); ++it) for (auto it = this->irc_clients.begin(); it != this->irc_clients.end(); ++it)
{ {
it->second->send_quit_command(exit_message); it->second->send_quit_command(exit_message);
it->second->leave_dummy_channel(exit_message); it->second->leave_dummy_channel(exit_message, "");
} }
} }
+2 -2
View File
@@ -1161,14 +1161,14 @@ DummyIrcChannel& IrcClient::get_dummy_channel()
return this->dummy_channel; return this->dummy_channel;
} }
void IrcClient::leave_dummy_channel(const std::string& exit_message) void IrcClient::leave_dummy_channel(const std::string& exit_message, const std::string& resource)
{ {
if (!this->dummy_channel.joined) if (!this->dummy_channel.joined)
return; return;
this->dummy_channel.joined = false; this->dummy_channel.joined = false;
this->dummy_channel.joining = false; this->dummy_channel.joining = false;
this->dummy_channel.remove_all_users(); this->dummy_channel.remove_all_users();
this->bridge.send_muc_leave(Iid("%"s + this->hostname, this->chantypes), std::string(this->current_nick), exit_message, true); this->bridge.send_muc_leave(Iid("%"s + this->hostname, this->chantypes), std::string(this->current_nick), exit_message, true, resource);
} }
#ifdef BOTAN_FOUND #ifdef BOTAN_FOUND