class ModuleBanRedirect : public Module
{
- BanRedirect* re;
+ BanRedirect re;
bool nofollow;
Module* ExceptionModule;
public:
ModuleBanRedirect(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), re(Me)
{
- re = new BanRedirect(Me);
nofollow = false;
- if(!ServerInstance->Modes->AddModeWatcher(re))
- {
- delete re;
+ if(!ServerInstance->Modes->AddModeWatcher(&re))
throw ModuleException("Could not add mode watcher");
- }
- OnRehash(NULL, "");
+ OnRehash(NULL);
Implementation list[] = { I_OnRehash, I_OnUserPreJoin, I_OnChannelDelete, I_OnCleanup };
Me->Modules->Attach(list, this, 4);
}
}
- virtual void OnRehash(User* user, const std::string ¶m)
+ virtual void OnRehash(User* user)
{
ExceptionModule = ServerInstance->Modules->Find("m_banexception.so");
}
virtual ~ModuleBanRedirect()
{
- ServerInstance->Modes->DelModeWatcher(re);
- delete re;
+ ServerInstance->Modes->DelModeWatcher(&re);
}
virtual Version GetVersion()