summaryrefslogtreecommitdiff
path: root/src/uplink.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-07-21 03:59:59 -0400
committerAdam <Adam@anope.org>2013-07-21 03:59:59 -0400
commit604da898136b9299f555336df633e30a09f44ddd (patch)
treeab4a3e380d16a6f9b6e2f320feaaeb095ff2c872 /src/uplink.cpp
parente11abdc4f00b19feae7830d4de6098e282e7eb39 (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.cpp6
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;