#include "users.h"
#include "channels.h"
#include "modules.h"
-#include "helperfuncs.h"
+
#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +c */
+
+
class BlockColor : public ModeHandler
{
public:
- BlockColor() : ModeHandler('c', 0, 0, false, MODETYPE_CHANNEL, false) { }
+ BlockColor(InspIRCd* Instance) : ModeHandler(Instance, 'c', 0, 0, false, MODETYPE_CHANNEL, false) { }
ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
{
class ModuleBlockColour : public Module
{
- Server *Srv;
+
BlockColor *bc;
public:
- ModuleBlockColour(Server* Me) : Module::Module(Me)
+ ModuleBlockColour(InspIRCd* Me) : Module::Module(Me)
{
- Srv = Me;
- bc = new BlockColor();
- Srv->AddMode(bc, 'c');
+
+ bc = new BlockColor(ServerInstance);
+ ServerInstance->AddMode(bc, 'c');
}
void Implements(char* List)
virtual void On005Numeric(std::string &output)
{
- InsertMode(output,"c",4);
}
virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status)
{
}
- virtual Module * CreateModule(Server* Me)
+ virtual Module * CreateModule(InspIRCd* Me)
{
return new ModuleBlockColour(Me);
}