]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_samode.cpp
Convert more modules
[user/henk/code/inspircd.git] / src / modules / m_samode.cpp
index a5630751b35a1b76fa6a81b2a38cb612584e6b33..92800e701be72989aa6f3d9eb2a41a7d102c1c03 100644 (file)
 
 /* $ModDesc: Provides more advanced UnrealIRCd SAMODE command */
 
-#include <stdio.h>
+#include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "inspircd.h"
 
 /** Handle /SAMODE
  */
@@ -51,7 +50,7 @@ class cmd_samode : public command_t
                        while ((one = spaced.GetToken()) != "")
                                n.push_back(one);
 
-                       Event rmode((char *)&n, NULL, "send_mode_explicit");
+                       Event rmode((char *)&n, NULL, "send_mode");
                        rmode.Send(ServerInstance);
 
                        n.clear();
@@ -61,9 +60,9 @@ class cmd_samode : public command_t
 
                        /* XXX: Yes, this is right. We dont want to propogate the
                         * actual SAMODE command, just the MODE command generated
-                        * by the send_mode_explicit
+                        * by the send_mode
                         */
-                       return CMD_FAILURE;
+                       return CMD_LOCALONLY;
                }
                else
                {
@@ -79,7 +78,7 @@ class ModuleSaMode : public Module
        cmd_samode*     mycommand;
  public:
        ModuleSaMode(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                
                mycommand = new cmd_samode(ServerInstance);
@@ -116,7 +115,7 @@ class ModuleSaModeFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleSaModeFactory;
 }