Do not send an empty password at all, if the user didn't provide one

This commit is contained in:
Florent Le Coz
2015-01-14 13:53:25 +01:00
parent 60569993b4
commit 4203384e2a
+2
View File
@@ -210,6 +210,8 @@ void IrcClient::send_join_command(const std::string& chan_name, const std::strin
{ {
if (this->welcomed == false) if (this->welcomed == false)
this->channels_to_join.emplace_back(chan_name, password); this->channels_to_join.emplace_back(chan_name, password);
else if (password.empty())
this->send_message(IrcMessage("JOIN", {chan_name}));
else else
this->send_message(IrcMessage("JOIN", {chan_name, password})); this->send_message(IrcMessage("JOIN", {chan_name, password}));
this->start(); this->start();