]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Of course, it DOES help to actually initialise the Mutex objects, and delete them...
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index ffb263ff7743c14218ddb44e646964686370643e..bfe6697e47206b2cd85de691afc38bfeaeff1329 100644 (file)
@@ -62,6 +62,9 @@ class BanRedirect : public ModeWatcher
                        std::string::iterator start_pos = param.begin();
                        long maxbans = channel->GetMaxBans();
 
+                       if (param.length() >= 2 && param[1] == ':')
+                               return true;
+
                        if(adding && (channel->bans.size() > static_cast<unsigned>(maxbans)))
                        {
                                source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick.c_str(), channel->name.c_str(), channel->name.c_str(), maxbans);
@@ -291,7 +294,7 @@ class ModuleBanRedirect : public Module
 
                                for(BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); redir++)
                                {
-                                       if(ServerInstance->MatchText(user->GetFullRealHost(), redir->banmask) || ServerInstance->MatchText(user->GetFullHost(), redir->banmask) || ServerInstance->MatchText(ipmask, redir->banmask))
+                                       if(InspIRCd::Match(user->GetFullRealHost(), redir->banmask) || InspIRCd::Match(user->GetFullHost(), redir->banmask) || InspIRCd::MatchCIDR(ipmask, redir->banmask))
                                        {
                                                /* tell them they're banned and are being transferred */
                                                Channel* destchan = ServerInstance->FindChan(redir->targetchan);
@@ -329,7 +332,7 @@ class ModuleBanRedirect : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
        }
 
        void Prioritize()