]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_globops.cpp
m_dccallow Validate tokens before use
[user/henk/code/inspircd.git] / src / modules / m_globops.cpp
index 2ef6d61d8f69b0f1bf6b0f93c93133b71055f103..85d84252b2b11875100f7b25148f40bf221980f5 100644 (file)
  */
 
 
-// Globops and +g support module by C.J.Edwards
+// Globops and snomask +g module by C.J.Edwards
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for GLOBOPS and user mode +g */
+/* $ModDesc: Provides support for GLOBOPS and snomask +g */
 
 /** Handle /GLOBOPS
  */
@@ -38,13 +38,7 @@ class CommandGlobops : public Command
 
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
-               std::string line = "From " + std::string(user->nick) + ": ";
-               for (int i = 0; i < (int)parameters.size(); i++)
-               {
-                       line = line + parameters[i] + " ";
-               }
-               ServerInstance->SNO->WriteGlobalSno('g',line);
-
+               ServerInstance->SNO->WriteGlobalSno('g', "From " + user->nick + ": " + parameters[0]);
                return CMD_SUCCESS;
        }
 };
@@ -57,13 +51,13 @@ class ModuleGlobops : public Module
 
        void init()
        {
-               ServerInstance->AddCommand(&cmd);
+               ServerInstance->Modules->AddService(cmd);
                ServerInstance->SNO->EnableSnomask('g',"GLOBOPS");
        }
 
        virtual Version GetVersion()
        {
-               return Version("Provides support for GLOBOPS and user mode +g", VF_VENDOR);
+               return Version("Provides support for GLOBOPS and snomask +g", VF_VENDOR);
        }
 
 };