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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user