]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
Remove debug stuff
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index 975d86e3bf81165b92d76a34b6b110ff22919a20..4cc269f1efb324fdb5efda2cb9161cd99c9f8395 100644 (file)
  * ---------------------------------------------------
  */
 
-#include <stdio.h>
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 #include "inspircd.h"
 
 /* $ModDesc: Provides support for unreal-style channel mode +Q */
 
-
-
 class NoKicks : public ModeHandler
 {
  public:
        NoKicks(InspIRCd* Instance) : ModeHandler(Instance, 'Q', 0, 0, false, MODETYPE_CHANNEL, false) { }
 
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
        {
                if (adding)
                {
@@ -61,7 +55,7 @@ class ModuleNoKicks : public Module
        {
                
                nk = new NoKicks(ServerInstance);
-               if (!ServerInstance->AddMode(nk, 'Q'))
+               if (!ServerInstance->AddMode(nk))
                        throw ModuleException("Could not add new modes!");
        }
 
@@ -70,7 +64,7 @@ class ModuleNoKicks : public Module
                List[I_OnAccessCheck] = 1;
        }
 
-       virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type)
+       virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
        {
                if (access_type == AC_KICK)
                {
@@ -105,27 +99,4 @@ class ModuleNoKicks : public Module
 };
 
 
-class ModuleNoKicksFactory : public ModuleFactory
-{
- public:
-       ModuleNoKicksFactory()
-       {
-       }
-       
-       ~ModuleNoKicksFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleNoKicks(Me);
-       }
-       
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleNoKicksFactory;
-}
-
+MODULE_INIT(ModuleNoKicks)