diff options
author | Adam <Adam@anope.org> | 2014-03-19 02:40:48 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-03-19 02:40:48 -0400 |
commit | c1da009de302ba1ecbb42f5d7f009959955f4de7 (patch) | |
tree | d6e9ce0471a9437545c1773b9591de5e98860575 | |
parent | 4f412bc213a064346bc2d3ec3d6cf41a4c82ec58 (diff) |
Show a better log message when disconnecting from the uplink
-rw-r--r-- | src/uplink.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/uplink.cpp b/src/uplink.cpp index a393e6ccd..80727487a 100644 --- a/src/uplink.cpp +++ b/src/uplink.cpp @@ -138,7 +138,8 @@ void UplinkSocket::OnConnect() void UplinkSocket::OnError(const Anope::string &error) { - Log(LOG_TERMINAL) << "Unable to connect to uplink #" << (Anope::CurrentUplink + 1) << " (" << Config->Uplinks[Anope::CurrentUplink].host << ":" << Config->Uplinks[Anope::CurrentUplink].port << ")" << (!error.empty() ? (": " + error) : ""); + Anope::string what = !this->flags[SF_CONNECTED] ? "Unable to connect to" : "Lost connection from"; + Log(LOG_TERMINAL) << what << " uplink #" << (Anope::CurrentUplink + 1) << " (" << Config->Uplinks[Anope::CurrentUplink].host << ":" << Config->Uplinks[Anope::CurrentUplink].port << ")" << (!error.empty() ? (": " + error) : ""); } UplinkSocket::Message::Message() : source(Me) |