summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-08 07:52:22 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-08 07:52:22 +0100
commitc8b41d5e350354881caa933ab363a2e90f991524 (patch)
tree68f87c18618b63ce1750389b13088d6b1b0f5849 /src/irc
parentde7b3503a47ea7d5a6177359f6c799c2dd5e586e (diff)
downloadbiboumi-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.cpp7
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()