- ConfigReader Conf;
-
- if (rebind)
- {
- ConfigTagList tags = ServerInstance->Config->ConfTags("bind");
- for(ConfigIter i = tags.first; i != tags.second; ++i)
- {
- ConfigTag* tag = i->second;
- 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);
+ ConfigTag* security = ServerInstance->Config->ConfValue("security");
+ ConfigTag* options = ServerInstance->Config->ConfValue("options");
+ FlatLinks = security->getBool("flatlinks");
+ HideULines = security->getBool("hideulines");
+ AnnounceTSChange = options->getBool("announcets");
+ AllowOptCommon = options->getBool("allowmismatch");
+ ChallengeResponse = !security->getBool("disablehmac");
+ quiet_bursts = ServerInstance->Config->ConfValue("performance")->getBool("quietbursts");
+ PingWarnTime = options->getInt("pingwarning");
+ PingFreq = options->getInt("serverpingfreq");