* ---------------------------------------------------
*/
-#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 ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
if (adding)
{
{
nk = new NoKicks(ServerInstance);
- if (!ServerInstance->AddMode(nk, 'Q'))
+ if (!ServerInstance->AddMode(nk))
throw ModuleException("Could not add new modes!");
}
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)
{
};
-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)