diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-02-08 07:52:22 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-02-08 07:52:22 +0100 |
commit | c8b41d5e350354881caa933ab363a2e90f991524 (patch) | |
tree | 68f87c18618b63ce1750389b13088d6b1b0f5849 /src/irc | |
parent | de7b3503a47ea7d5a6177359f6c799c2dd5e586e (diff) | |
download | biboumi-c8b41d5e350354881caa933ab363a2e90f991524.tar.gz biboumi-c8b41d5e350354881caa933ab363a2e90f991524.tar.bz2 biboumi-c8b41d5e350354881caa933ab363a2e90f991524.tar.xz biboumi-c8b41d5e350354881caa933ab363a2e90f991524.zip |
Be verbose about IRC server connection failures, and handle them properly
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc_client.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 644351e..a84f96e 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -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() |