]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_devoice.cpp
Updates, should be able to safely unload client modules with queries in progress...
[user/henk/code/inspircd.git] / src / modules / m_devoice.cpp
index 70d510b9ae493a3a17436cbf912029e9abde0176..214de57833a21d967ccb241c92b8636e75850fc4 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
  *                       E-mail:
  *                <brain@chatspike.net>
  *               <Craig@chatspike.net>
@@ -28,17 +28,17 @@ using namespace std;
 #include "channels.h"
 #include "modules.h"
 
-Server *Srv;
+static Server *Srv;
         
 class cmd_devoice : public command_t
 {
  public:
-       cmd_devoice () : command_t("DEVOICE", 'o', 2)
+       cmd_devoice () : command_t("DEVOICE", 0, 1)
        {
                this->source = "m_devoice.so";
        }
 
-       void Handle (char **parameters, int pcnt, userrec *user)
+       void Handle (const char** parameters, int pcnt, userrec *user)
        {
                /*
                 * NOTE: DO NOT CODE LIKE THIS!!! This has no checks and can send
@@ -46,12 +46,12 @@ class cmd_devoice : public command_t
                 *
                 * - I'm not aware what checking I need, so for now... be supreme evil.
                 */
-                char* modes[3];
-                modes[0] = parameters[0];
-                modes[1] = "-v";
-                modes[2] = user->nick;
+               const char* modes[3];
+               modes[0] = parameters[0];
+               modes[1] = "-v";
+               modes[2] = user->nick;
 
-                Srv->SendMode(modes,3,user);
+               Srv->SendMode(modes,3,user);
        }
 };
 
@@ -96,7 +96,7 @@ class ModuleDeVoiceFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" void * module_init( void )
 {
        return new ModuleDeVoiceFactory;
 }