]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Rename the spanningtree module header to server.
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index f98cbd420176549147089a361a9f6e1b3312629a..4a4188757c23f31c5f59c59c065214ba88de984d 100644 (file)
@@ -54,7 +54,7 @@ class BanRedirect : public ModeWatcher
        {
        }
 
-       bool BeforeMode(User* source, User* dest, Channel* channel, std::string &param, bool adding)
+       bool BeforeMode(User* source, User* dest, Channel* channel, std::string& param, bool adding) CXX11_OVERRIDE
        {
                /* nick!ident@host -> nick!ident@host
                 * nick!ident@host#chan -> nick!ident@host#chan
@@ -239,9 +239,9 @@ class ModuleBanRedirect : public Module
        {
        }
 
-       void OnCleanup(int target_type, void* item) CXX11_OVERRIDE
+       void OnCleanup(ExtensionItem::ExtensibleType type, Extensible* item) CXX11_OVERRIDE
        {
-               if(target_type == TYPE_CHANNEL)
+               if (type == ExtensionItem::EXT_CHANNEL)
                {
                        Channel* chan = static_cast<Channel*>(item);
                        BanRedirectList* redirects = re.extItem.get(chan);
@@ -308,7 +308,7 @@ class ModuleBanRedirect : public Module
                                                if (destchan)
                                                        destlimit = destchan->GetModeParameter(limitmode);
 
-                                               if(destchan && destchan->IsModeSet(redirectmode) && !destlimit.empty() && (destchan->GetUserCounter() >= atoi(destlimit.c_str())))
+                                               if(destchan && destchan->IsModeSet(redirectmode) && !destlimit.empty() && (destchan->GetUserCounter() >= ConvToNum<size_t>(destlimit)))
                                                {
                                                        user->WriteNumeric(ERR_BANNEDFROMCHAN, chan->name, "Cannot join channel (You are banned)");
                                                        return MOD_RES_DENY;