summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-07-08 16:59:29 +0200
committerlouiz’ <louiz@louiz.org>2017-07-08 17:07:29 +0200
commit3a95076db40dbdff4b130c5d9b8db81e537a750d (patch)
treed7a8e5c46312cdc27f4df9a1b197980fad732947 /src/irc
parentfaed8952cb6ba063e5424364df69cef193fb736e (diff)
downloadbiboumi-3a95076db40dbdff4b130c5d9b8db81e537a750d.tar.gz
biboumi-3a95076db40dbdff4b130c5d9b8db81e537a750d.tar.bz2
biboumi-3a95076db40dbdff4b130c5d9b8db81e537a750d.tar.xz
biboumi-3a95076db40dbdff4b130c5d9b8db81e537a750d.zip
Send a 110 status code on a QUIT received for ourself
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc_client.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index 00a7158..00314b2 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -1015,6 +1015,9 @@ void IrcClient::on_quit(const IrcMessage& message)
const std::string& chan_name = pair.first;
IrcChannel* channel = pair.second.get();
const IrcUser* user = channel->find_user(message.prefix);
+ bool self = false;
+ if (user == channel->get_self())
+ self = true;
if (user)
{
std::string nick = user->nick;
@@ -1023,7 +1026,7 @@ void IrcClient::on_quit(const IrcMessage& message)
iid.set_local(chan_name);
iid.set_server(this->hostname);
iid.type = Iid::Type::Channel;
- this->bridge.send_muc_leave(iid, std::move(nick), txt, false);
+ this->bridge.send_muc_leave(iid, std::move(nick), txt, self);
}
}
}