using namespace std;
-#include <stdio.h>
-#include <string>
#include "users.h"
#include "channels.h"
#include "modules.h"
-
#include "inspircd.h"
/* $ModDesc: Provides channel +S mode (strip ansi colour) */
-
-
+/** Handles channel mode +S
+ */
class ChannelStripColor : public ModeHandler
{
public:
void Implements(char* List)
{
- List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
+ List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
}
- virtual void On005Numeric(std::string &output)
- {
- ServerInstance->Modes->InsertMode(output,"S",4);
- }
-
virtual ~ModuleStripColor()
{
+ ServerInstance->Modes->DelMode(usc);
+ ServerInstance->Modes->DelMode(csc);
DELETE(usc);
DELETE(csc);
}
virtual Version GetVersion()
{
// This is version 2 because version 1.x is the unreleased unrealircd module
- return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
+ return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR);
}
};