X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_banredirect.cpp;h=bfe6697e47206b2cd85de691afc38bfeaeff1329;hb=77954a2e31213ce355e9e319229c767dfbd698a4;hp=ffb263ff7743c14218ddb44e646964686370643e;hpb=4c286655e1b930908fd02681ac00e172156e737c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index ffb263ff7..bfe6697e4 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -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(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()