summaryrefslogtreecommitdiff
path: root/modules/commands/cs_fantasy_top.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/cs_fantasy_top.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/cs_fantasy_top.cpp')
-rw-r--r--modules/commands/cs_fantasy_top.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/commands/cs_fantasy_top.cpp b/modules/commands/cs_fantasy_top.cpp
index 9baceeda3..ef87cd87f 100644
--- a/modules/commands/cs_fantasy_top.cpp
+++ b/modules/commands/cs_fantasy_top.cpp
@@ -102,11 +102,12 @@ class CSTop : public Module
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
- void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
+ void OnReload(Configuration::Conf *conf) anope_override
{
- prefix = reader.ReadValue("chanstats", "prefix", "anope_", 0);
- Anope::string engine = reader.ReadValue("chanstats", "engine", "", 0);
- this->sql = ServiceReference<SQL::Provider>("SQL::Provider", engine);
+ prefix = conf->GetModule(this)->Get<const Anope::string &>("prefix");
+ if (prefix.empty())
+ prefix = "anope_";
+ this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule(this)->Get<const Anope::string &>("engine"));
}
SQL::Result RunQuery(const SQL::Query &query)