- ConfigReader* Conf = new ConfigReader(ServerInstance);
- if (rebind)
- {
- for (unsigned int i = 0; i < Bindings.size(); i++)
- {
- delete Bindings[i];
- }
- ServerInstance->BufferedSocketCull();
- Bindings.clear();
-
- for (int j = 0; j < Conf->Enumerate("bind"); j++)
- {
- std::string Type = Conf->ReadValue("bind","type",j);
- std::string IP = Conf->ReadValue("bind","address",j);
- std::string Port = Conf->ReadValue("bind","port",j);
- std::string transport = Conf->ReadValue("bind","transport",j);
- if (Type == "servers")
- {
- irc::portparser portrange(Port, false);
- int portno = -1;
-
- if (IP == "*")
- IP.clear();
-
- while ((portno = portrange.GetToken()))
- {
- if ((!transport.empty()) && (hooks.find(transport.c_str()) == hooks.end()))
- {
- throw CoreException("Can't find transport type '"+transport+"' for port "+IP+":"+Port+" - maybe you forgot to load it BEFORE m_spanningtree in your config file?");
- break;
- }
-
- ServerSocketListener *listener = new ServerSocketListener(ServerInstance, this, portno, (char *)IP.c_str());
- if (listener->GetFd() == -1)
- {
- delete listener;
- continue;
- }
-
- if (!transport.empty())
- listener->AddIOHook(hooks[transport.c_str()]);
-
- Bindings.push_back(listener);
- }
- }
- }
- }
- FlatLinks = Conf->ReadFlag("security","flatlinks",0);
- HideULines = Conf->ReadFlag("security","hideulines",0);
- AnnounceTSChange = Conf->ReadFlag("options","announcets",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");