From 3a95076db40dbdff4b130c5d9b8db81e537a750d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sat, 8 Jul 2017 16:59:29 +0200 Subject: Send a 110 status code on a QUIT received for ourself --- src/irc/irc_client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/irc') 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); } } } -- cgit v1.2.3