]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operjoin.cpp
Attach to events and register services in init()
[user/henk/code/inspircd.git] / src / modules / m_operjoin.cpp
index af787b815980ab35a454472cadc331accbe7b03a..c4b2d5599b35589c99cdfcbd503e3b08fc5f30e7 100644 (file)
@@ -53,7 +53,7 @@ class ModuleOperjoin : public Module
                }
 
        public:
-               ModuleOperjoin()
+               void init()
                {
                        OnRehash(NULL);
                        Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
@@ -63,10 +63,10 @@ class ModuleOperjoin : public Module
 
                virtual void OnRehash(User* user)
                {
-                       ConfigReader conf;
+                       ConfigTag* tag = ServerInstance->Config->ConfValue("operjoin");
 
-                       operChan = conf.ReadValue("operjoin", "channel", 0);
-                       override = conf.ReadFlag("operjoin", "override", "0", 0);
+                       operChan = tag->getString("channel");
+                       override = tag->getBool("override", false);
                        operChans.clear();
                        if (!operChan.empty())
                                tokenize(operChan,operChans);