Refactor channel->parting to a new location

This commit is contained in:
louiz’
2016-10-23 23:58:03 +02:00
parent 8b8bbceeb3
commit 00eb18bae8
2 changed files with 2 additions and 4 deletions
+1 -4
View File
@@ -365,10 +365,7 @@ void Bridge::leave_irc_channel(Iid&& iid, const std::string& status_message, con
// acknowledgment from the server
IrcChannel* channel = irc->get_channel(iid.get_local());
if (channel->joined && !channel->parting)
{
irc->send_part_command(iid.get_local(), status_message);
channel->parting = true;
}
irc->send_part_command(iid.get_local(), status_message);
// Since there are no resources left in that channel, we don't
// want to receive private messages using this room's JID
this->remove_all_preferred_from_jid_of_room(iid.get_local());
+1
View File
@@ -502,6 +502,7 @@ void IrcClient::send_part_command(const std::string& chan_name, const std::strin
this->leave_dummy_channel(status_message);
else
this->send_message(IrcMessage("PART", {chan_name, status_message}));
channel->parting = true;
}
}