1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 04:56:38 +02:00

More basic config validation, and fix crash when no uplinks are configured. spotted by fgs

This commit is contained in:
Adam
2013-07-21 03:59:59 -04:00
parent e11abdc4f0
commit 604da89813
3 changed files with 21 additions and 4 deletions
+6
View File
@@ -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;