source->WriteServ("478 %s %s :Channel ban list for %s is full (maximum entries for this channel is %d)", source->nick, channel->name, channel->name, maxbans);
return false;
{
source->WriteServ("478 %s %s :Channel ban list for %s is full (maximum entries for this channel is %d)", source->nick, channel->name, channel->name, maxbans);
return false;
@@ -158,7+154,7 @@ class BanRedirect : public ModeWatcher
if(redirects->empty())
{
if(redirects->empty())
{
- DELETE(redirects);
+ delete redirects;
channel->Shrink("banredirects");
}
channel->Shrink("banredirects");
}
@@ -197,18+193,20 @@ class ModuleBanRedirect : public Module
re = new BanRedirect(Me);
nofollow = false;
re = new BanRedirect(Me);
nofollow = false;
- if(!ServerInstance->AddModeWatcher(re))
+ if(!ServerInstance->Modes->AddModeWatcher(re))
+ {
+ delete re;
throw ModuleException("Could not add mode watcher");
throw ModuleException("Could not add mode watcher");