X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_maphide.cpp;h=d9e58ca48ad90ade6c626c8bb57b1eec5d9d90b5;hb=84a1569cd60daa64b1ae52a1fff62c0dc4d78850;hp=b78cd2c7eca85028fb394509f98cc8b3718b6d7f;hpb=fcacc8e0306382bc3f938073092c3729d77e2b41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_maphide.cpp b/src/modules/m_maphide.cpp index b78cd2c7e..d9e58ca48 100644 --- a/src/modules/m_maphide.cpp +++ b/src/modules/m_maphide.cpp @@ -25,17 +25,16 @@ class ModuleMapHide : public Module { std::string url; public: - ModuleMapHide() + void init() { Implementation eventlist[] = { I_OnPreCommand, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } void OnRehash(User* user) { - ConfigReader MyConf; - url = MyConf.ReadValue("security", "maphide", 0); + url = ServerInstance->Config->ConfValue("security")->getString("maphide"); } ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line)