- virtual void OnRehash(User* user, const std::string ¶meter)
- {
- ConfigReader Conf(ServerInstance);
- MySuffix = Conf.ReadValue("host","suffix",0);
- MyPrefix = Conf.ReadValue("host","prefix","",0);
- MySeparator = Conf.ReadValue("host","separator",".",0);
- for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
- {
- delete i->second;
- }
- hostchanges.clear();
- for (int index = 0; index < Conf.Enumerate("hostchange"); index++)
- {
- std::string mask = Conf.ReadValue("hostchange", "mask", index);
- std::string ports = Conf.ReadValue("hosthange", "ports", index);
- std::string action = Conf.ReadValue("hostchange", "action", index);
- std::string newhost = Conf.ReadValue("hostchange", "value", index);
- Host* x = new Host;
- x->action = action;
- x->ports = ports;
- x->newhost = newhost;
- hostchanges[mask] = x;
+ hostchanges.push_back(std::make_pair(mask, Host(act, newhost, tag->getString("ports"))));