- ConfigReader Conf;
-
- if (rebind)
- {
- for (int j = 0; ; j++)
- {
- ConfigTag* tag = ServerInstance->Config->ConfValue("bind", j);
- if (!tag)
- break;
- std::string Type = tag->getString("type");
- std::string IP = tag->getString("address");
- std::string Port = tag->getString("port");
- std::string ssl = tag->getString("ssl");
- if (Type == "servers")
- {
- irc::portparser portrange(Port, false);
- int portno = -1;
-
- if (IP == "*")
- IP.clear();
-
- while ((portno = portrange.GetToken()))
- {
- ServerSocketListener *listener = new ServerSocketListener(this, portno, IP, ssl);
- if (listener->GetFd() == -1)
- {
- delete listener;
- continue;
- }
-
- ServerInstance->ports.push_back(listener);
- }
- }
- }
- }
- FlatLinks = Conf.ReadFlag("security","flatlinks",0);
- HideULines = Conf.ReadFlag("security","hideulines",0);
- AnnounceTSChange = Conf.ReadFlag("options","announcets",0);
- AllowOptCommon = Conf.ReadFlag("options", "allowmismatch", 0);
- ChallengeResponse = !Conf.ReadFlag("security", "disablehmac", 0);
- quiet_bursts = Conf.ReadFlag("performance", "quietbursts", 0);
- PingWarnTime = Conf.ReadInteger("options", "pingwarning", 0, true);
- PingFreq = Conf.ReadInteger("options", "serverpingfreq", 0, true);
-
- if (PingFreq == 0)
- PingFreq = 60;
-
- if (PingWarnTime < 0 || PingWarnTime > PingFreq - 1)
+ ConfigTag* security = ServerInstance->Config->ConfValue("security");
+ ConfigTag* options = ServerInstance->Config->ConfValue("options");
+ FlatLinks = security->getBool("flatlinks");
+ HideULines = security->getBool("hideulines");
+ HideSplits = security->getBool("hidesplits");
+ AnnounceTSChange = options->getBool("announcets");
+ AllowOptCommon = options->getBool("allowmismatch");
+ quiet_bursts = ServerInstance->Config->ConfValue("performance")->getBool("quietbursts");
+ PingWarnTime = options->getDuration("pingwarning", 15);
+ PingFreq = options->getDuration("serverpingfreq", 60, 1);
+
+ if (PingWarnTime >= PingFreq)