summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorlouiz <louiz@louiz.org>2017-03-27 14:55:43 +0200
committerlouiz <louiz@louiz.org>2017-03-27 14:55:43 +0200
commit4baedc45d01a08d56d9e83f2f83ba9e303eebbcb (patch)
tree7b45e37de97c881c7587e126596a6d6f202e38a7 /src/irc
parent1017e8f46bb6c4c9f878cba5e70f7c3a4c831433 (diff)
parent55f74349259fa0037de98d30d70b50396c4804f5 (diff)
downloadbiboumi-4baedc45d01a08d56d9e83f2f83ba9e303eebbcb.tar.gz
biboumi-4baedc45d01a08d56d9e83f2f83ba9e303eebbcb.tar.bz2
biboumi-4baedc45d01a08d56d9e83f2f83ba9e303eebbcb.tar.xz
biboumi-4baedc45d01a08d56d9e83f2f83ba9e303eebbcb.zip
Merge branch 'persistent_chans' into 'master'
Add a Persistent option on channels Closes #3230 See merge request !6
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc_client.cpp14
-rw-r--r--src/irc/irc_client.hpp2
2 files changed, 4 insertions, 12 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index 93e463b..00eab6f 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -501,15 +501,7 @@ void IrcClient::send_private_message(const std::string& username, const std::str
void IrcClient::send_part_command(const std::string& chan_name, const std::string& status_message)
{
- IrcChannel* channel = this->get_channel(chan_name);
- if (channel->joined == true)
- {
- if (chan_name.empty())
- this->leave_dummy_channel(status_message);
- else
- this->send_message(IrcMessage("PART", {chan_name, status_message}));
- channel->parting = true;
- }
+ this->send_message(IrcMessage("PART", {chan_name, status_message}));
}
void IrcClient::send_mode_command(const std::string& chan_name, const std::vector<std::string>& arguments)
@@ -1160,14 +1152,14 @@ DummyIrcChannel& IrcClient::get_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)
return;
this->dummy_channel.joined = false;
this->dummy_channel.joining = false;
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
diff --git a/src/irc/irc_client.hpp b/src/irc/irc_client.hpp
index 009d0c9..435dce6 100644
--- a/src/irc/irc_client.hpp
+++ b/src/irc/irc_client.hpp
@@ -283,7 +283,7 @@ public:
* Leave the dummy channel: forward a message to the user to indicate that
* he left it, and mark it as not joined.
*/
- void leave_dummy_channel(const std::string& exit_message);
+ void leave_dummy_channel(const std::string& exit_message, const std::string& resource);
const std::string& get_hostname() const { return this->hostname; }
std::string get_nick() const { return this->current_nick; }