summaryrefslogtreecommitdiff
path: root/modules/commands/os_dns.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
committerAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
commit1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch)
tree4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/commands/os_dns.cpp
parent781defb7076ddfddf723ca08cd0a518b6657b64f (diff)
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/commands/os_dns.cpp')
-rw-r--r--modules/commands/os_dns.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp
index 346ff4727..9d1a12eb6 100644
--- a/modules/commands/os_dns.cpp
+++ b/modules/commands/os_dns.cpp
@@ -686,15 +686,15 @@ class ModuleDNS : public Module
delete dns_servers->at(i - 1);
}
- void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
- {
-
- this->ttl = Anope::DoTime(reader.ReadValue("os_dns", "ttl", 0));
- this->user_drop_mark = reader.ReadInteger("os_dns", "user_drop_mark", 0, false);
- this->user_drop_time = Anope::DoTime(reader.ReadValue("os_dns", "user_drop_time", 0, false));
- this->user_drop_readd_time = Anope::DoTime(reader.ReadValue("os_dns", "user_drop_readd_time", 0, false));
- this->remove_split_servers = reader.ReadFlag("os_dns", "remove_split_servers", 0);
- this->readd_connected_servers = reader.ReadFlag("os_dns", "readd_connected_servers", 0);
+ void OnReload(Configuration::Conf *conf) anope_override
+ {
+ Configuration::Block *block = conf->GetModule(this);
+ this->ttl = block->Get<time_t>("ttl");
+ this->user_drop_mark = block->Get<int>("user_drop_mark");
+ this->user_drop_time = block->Get<time_t>("user_drop_time");
+ this->user_drop_readd_time = block->Get<time_t>("user_drop_readd_time");
+ this->remove_split_servers = block->Get<bool>("remove_split_servers");
+ this->readd_connected_servers = block->Get<bool>("readd_connected_servers");
}
void OnNewServer(Server *s) anope_override