summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-23 23:58:03 +0200
committerlouiz’ <louiz@louiz.org>2016-10-23 23:58:03 +0200
commit00eb18bae8cf62d49f4b5d42aed8507fcca3c03c (patch)
tree7d1bd883ebb927d11e5fe42eaf14804d9c74d3fc /src
parent8b8bbceeb39b32b90f76a9c0beb3f7d30ed6fd7b (diff)
downloadbiboumi-00eb18bae8cf62d49f4b5d42aed8507fcca3c03c.tar.gz
biboumi-00eb18bae8cf62d49f4b5d42aed8507fcca3c03c.tar.bz2
biboumi-00eb18bae8cf62d49f4b5d42aed8507fcca3c03c.tar.xz
biboumi-00eb18bae8cf62d49f4b5d42aed8507fcca3c03c.zip
Refactor channel->parting to a new location
Diffstat (limited to 'src')
-rw-r--r--src/bridge/bridge.cpp5
-rw-r--r--src/irc/irc_client.cpp1
2 files changed, 2 insertions, 4 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 9300d45..ac69ebc 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -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());
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index c301af0..9877806 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -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;
}
}