diff options
author | Adam <Adam@anope.org> | 2013-07-21 03:59:59 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-07-21 03:59:59 -0400 |
commit | 604da898136b9299f555336df633e30a09f44ddd (patch) | |
tree | ab4a3e380d16a6f9b6e2f320feaaeb095ff2c872 /src/uplink.cpp | |
parent | e11abdc4f00b19feae7830d4de6098e282e7eb39 (diff) |
More basic config validation, and fix crash when no uplinks are configured. spotted by fgs
Diffstat (limited to 'src/uplink.cpp')
-rw-r--r-- | src/uplink.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uplink.cpp b/src/uplink.cpp index 9f2caa02d..871121cc9 100644 --- a/src/uplink.cpp +++ b/src/uplink.cpp @@ -38,6 +38,12 @@ class ReconnectTimer : public Timer void Uplink::Connect() { + if (Config->Uplinks.empty()) + { + Log() << "Warning: There are no configured uplinks."; + return; + } + if (static_cast<unsigned>(++Anope::CurrentUplink) >= Config->Uplinks.size()) Anope::CurrentUplink = 0; |