From e560352fcf95ba70891d1a847973160c923fb702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 26 Aug 2018 17:39:16 +0200 Subject: Force connect to a server when a presence is received on a server JID --- 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 0b5715e..b72c078 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -481,7 +481,10 @@ void IrcClient::send_topic_command(const std::string& chan_name, const std::stri void IrcClient::send_quit_command(const std::string& reason) { - this->send_message(IrcMessage("QUIT", {reason}), {}, false); + if (!reason.empty()) + this->send_message(IrcMessage("QUIT", {reason}), {}, false); + else + this->send_message(IrcMessage("QUIT", {}), {}, false); } void IrcClient::send_join_command(const std::string& chan_name, const std::string& password) -- cgit v1.2.3