]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_globops.cpp
Reset the already_sent IDs during slow garbage collection
[user/henk/code/inspircd.git] / src / modules / m_globops.cpp
index fafc3df2cc5e4e8d8b85fbc4413fb1a448eb7c83..f02f8a1b227fe3c5c0bdc960318006ca29d1015b 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
 class CommandGlobops : public Command
 {
  public:
-       CommandGlobops (InspIRCd* Instance) : Command(Instance,"GLOBOPS","o",1)
+       CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1)
        {
-               this->source = "m_globops.so";
-               syntax = "<any-text>";
+               flags_needed = 'o'; syntax = "<any-text>";
                TRANSLATE2(TR_TEXT, TR_END);
        }
 
@@ -37,21 +36,20 @@ class CommandGlobops : public Command
                        line = line + parameters[i] + " ";
                }
                ServerInstance->SNO->WriteToSnoMask('g',line);
+               ServerInstance->PI->SendSNONotice("g", line);
 
-               /* route it (ofc :p) */
                return CMD_SUCCESS;
        }
 };
 
 class ModuleGlobops : public Module
 {
-       CommandGlobops* mycommand;
+       CommandGlobops cmd;
  public:
-       ModuleGlobops(InspIRCd* Me)
-               : Module(Me)
+       ModuleGlobops()
+               : cmd(this)
        {
-               mycommand = new CommandGlobops(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
+               ServerInstance->AddCommand(&cmd);
                ServerInstance->SNO->EnableSnomask('g',"GLOBOPS");
 
        }
@@ -63,7 +61,7 @@ class ModuleGlobops : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for GLOBOPS and user mode +g", VF_OPTCOMMON | VF_VENDOR);
        }
 
 };