]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_globops.cpp
m_testcommand deletes its command handler manually, no modules should do this. Will...
[user/henk/code/inspircd.git] / src / modules / m_globops.cpp
index f7a072b6f3f80710a6088982d3a02c6251b113ed..1a49858e2e009276f64101b5ac3c8268adb3db4d 100644 (file)
@@ -2,28 +2,21 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  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.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 // Globops and +g support module by C.J.Edwards
 
-#include <stdio.h>
-#include <string>
+#include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "inspircd.h"
 
 /* $ModDesc: Provides support for GLOBOPS and user mode +g */
 
@@ -47,6 +40,7 @@ class cmd_globops : public command_t
                }
                ServerInstance->SNO->WriteToSnoMask('g',line);
 
+               /* route it (ofc :p) */
                return CMD_SUCCESS;
        }
 };
@@ -56,7 +50,7 @@ class ModuleGlobops : public Module
        cmd_globops* mycommand;
  public:
        ModuleGlobops(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                mycommand = new cmd_globops(ServerInstance);
                ServerInstance->AddCommand(mycommand);
@@ -79,27 +73,4 @@ class ModuleGlobops : public Module
        }
 };
 
-class ModuleGlobopsFactory : public ModuleFactory
-{
- public:
-       ModuleGlobopsFactory()
-       {
-       }
-       
-       ~ModuleGlobopsFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleGlobops(Me);
-       }
-       
-};
-
-
-extern "C" void * init_module( void )
-{
-       return new ModuleGlobopsFactory;
-}
-
+MODULE_INIT(ModuleGlobops)