]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operjoin.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_operjoin.cpp
index b717ac3ef6f50fb78fe22aad3a571472e03c9ccf..2f5dda0ff4a55425d690c028ac979e5a26a3091a 100644 (file)
@@ -28,7 +28,6 @@
 
 class ModuleOperjoin : public Module
 {
-       private:
                std::string operChan;
                std::vector<std::string> operChans;
                bool override;
@@ -53,11 +52,11 @@ 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));
                }
 
 
@@ -72,10 +71,6 @@ class ModuleOperjoin : public Module
                                tokenize(operChan,operChans);
                }
 
-               virtual ~ModuleOperjoin()
-               {
-               }
-
                virtual Version GetVersion()
                {
                        return Version("Forces opers to join the specified channel(s) on oper-up", VF_VENDOR);
@@ -90,7 +85,7 @@ class ModuleOperjoin : public Module
                                if (ServerInstance->IsChannel(it->c_str(), ServerInstance->Config->Limits.ChanMax))
                                        Channel::JoinUser(user, it->c_str(), override, "", false, ServerInstance->Time());
 
-                       std::string chanList = IS_OPER(user)->getConfig("autojoin");
+                       std::string chanList = user->oper->getConfig("autojoin");
                        if (!chanList.empty())
                        {
                                std::vector<std::string> typechans;