]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operjoin.cpp
Fix ModuleManager error caused by a lack of arguments.
[user/henk/code/inspircd.git] / src / modules / m_operjoin.cpp
index af787b815980ab35a454472cadc331accbe7b03a..bd77384a604eb105d1d17fef1378f2a37c7fc2cc 100644 (file)
@@ -53,20 +53,20 @@ class ModuleOperjoin : public Module
                }
 
        public:
-               ModuleOperjoin()
+               void init()
                {
                        OnRehash(NULL);
                        Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
-                       ServerInstance->Modules->Attach(eventlist, this, 2);
+                       ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                }
 
 
                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);