diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-02-22 21:42:24 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-02-22 21:42:24 +0100 |
commit | 99aba5667d0d7ba6657f9c175a9342126bc4b0f2 (patch) | |
tree | 2448f73a7e4129f1a8f9f51e230dd00111452a30 /src/irc/irc_client.cpp | |
parent | 61ca40fa0e6c819aa72f3f2364667c7b990855d4 (diff) | |
download | biboumi-99aba5667d0d7ba6657f9c175a9342126bc4b0f2.tar.gz biboumi-99aba5667d0d7ba6657f9c175a9342126bc4b0f2.tar.bz2 biboumi-99aba5667d0d7ba6657f9c175a9342126bc4b0f2.tar.xz biboumi-99aba5667d0d7ba6657f9c175a9342126bc4b0f2.zip |
Connection to servers does not block the process anymore
Diffstat (limited to 'src/irc/irc_client.cpp')
-rw-r--r-- | src/irc/irc_client.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 0d5c4e3..d35437c 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -29,10 +29,13 @@ void IrcClient::start() { 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); + this->connect(this->hostname, "6667"); +} + +void IrcClient::on_connection_failed(const std::string& reason) +{ + this->bridge->send_xmpp_message(this->hostname, "", + std::string("Connection failed: ") + reason); } void IrcClient::on_connected() |