]> 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 e0ded1712e7cca693d5d365235e9b7ca000aa4f6..214de57833a21d967ccb241c92b8636e75850fc4 100644 (file)
@@ -28,7 +28,7 @@ using namespace std;
 #include "channels.h"
 #include "modules.h"
 
-Server *Srv;
+static Server *Srv;
         
 class cmd_devoice : public command_t
 {
@@ -38,7 +38,7 @@ class cmd_devoice : public command_t
                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;
 }