class ModuleBlockCAPS : public Module
{
- BlockCaps* bc;
+ BlockCaps bc;
int percent;
unsigned int minlen;
char capsmap[256];
public:
- ModuleBlockCAPS(InspIRCd* Me) : Module(Me)
+ ModuleBlockCAPS(InspIRCd* Me) : Module(Me), bc(Me)
{
- OnRehash(NULL,"");
- bc = new BlockCaps(ServerInstance);
- if (!ServerInstance->Modes->AddMode(bc))
- {
- delete bc;
+ OnRehash(NULL);
+ if (!ServerInstance->Modes->AddMode(&bc))
throw ModuleException("Could not add new modes!");
- }
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash, I_On005Numeric };
ServerInstance->Modules->Attach(eventlist, this, 4);
}
ServerInstance->AddExtBanChar('B');
}
- virtual void OnRehash(User* user, const std::string ¶m)
+ virtual void OnRehash(User* user)
{
ReadConf();
}
virtual ~ModuleBlockCAPS()
{
- ServerInstance->Modes->DelMode(bc);
- delete bc;
+ ServerInstance->Modes->DelMode(&bc);
}
virtual Version GetVersion()