]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operlevels.cpp
Add config <options:disablehmac> to support disabling of HMAC, and tidy up to detect...
[user/henk/code/inspircd.git] / src / modules / m_operlevels.cpp
index 0c97765b9e5e1982d85ff5d91e0e09fee86f7e36..f8fdb89d69760b416224d9d846f304702b48afcb 100644 (file)
@@ -1,32 +1,43 @@
-using namespace std;
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
 
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
 #include <string>
-#include "helperfuncs.h"
+
 #include "inspircd.h"
 
 /* $ModDesc: Gives each oper type a 'level', cannot kill opers 'above' your level. */
 
-extern InspIRCd* ServerInstance;
+
 
 class ModuleOperLevels : public Module
 {
 
        private:
 
-               Server* Srv;
+               
                ConfigReader* conf;
 
        public:
 
-               ModuleOperLevels(Server* Me)
+               ModuleOperLevels(InspIRCd* Me)
                        : Module::Module(Me)
                {
 
-                       Srv = Me;
-                       conf = new ConfigReader;
+                       
+                       conf = new ConfigReader(ServerInstance);
                }
 
                virtual ~ModuleOperLevels()
@@ -39,15 +50,15 @@ class ModuleOperLevels : public Module
                        List[I_OnRehash] = List[I_OnKill] = 1;
                }
 
-               virtual void OnRehash(const std::string &parameter)
+               virtual void OnRehash(userrec* user, const std::string &parameter)
                {
                        DELETE(conf);
-                       conf = new ConfigReader;
+                       conf = new ConfigReader(ServerInstance);
                }
 
                virtual Version GetVersion()
                {
-                       return Version(1,0,0,1,VF_VENDOR);
+                       return Version(1,1,0,1,VF_VENDOR,API_VERSION);
                }
 
                virtual int OnKill(userrec* source, userrec* dest, const std::string &reason)
@@ -98,9 +109,8 @@ class ModuleOperLevelsFactory : public ModuleFactory
        {
        }
 
-       virtual Module * CreateModule(Server* Me)
+       virtual Module * CreateModule(InspIRCd* Me)
        {
-               log(DEBUG,"CreateModule");
                return new ModuleOperLevels(Me);
        }