Be verbose about IRC server connection failures, and handle them properly

This commit is contained in:
Florent Le Coz
2014-02-08 07:52:22 +01:00
parent de7b3503a4
commit c8b41d5e35
4 changed files with 20 additions and 11 deletions
+6 -1
View File
@@ -27,7 +27,12 @@ IrcClient::~IrcClient()
void IrcClient::start()
{
this->connect(this->hostname, "6667");
this->bridge->send_xmpp_message(this->hostname, "", std::string("Connecting to ") +
this->hostname + ":" + "6667");
std::pair<bool, std::string> res = this->connect(this->hostname, "6667");
if (!res.first)
this->bridge->send_xmpp_message(this->hostname, "",
std::string("Connection failed: ") + res.second);
}
void IrcClient::on_connected()