Backport a trunk fix which prevents the 'oper overrode your limit' when theres no limit set or when +l isnt reached yet (bug#120)

git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@3999 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2006-06-13 14:05:51 +00:00
parent 927cdae529
commit b5305c2f66

View File

@ -205,7 +205,7 @@ class ModuleOverride : public Module
Srv->SendOpers("*** "+std::string(user->nick)+" used operoverride to bypass +k on "+std::string(cname));
return -1;
}
if ((chan->limit >= Srv->CountUsers(chan)) && (CanOverride(user,"LIMIT")))
if ((chan->limit > 0) && (Srv->CountUsers(chan) >= chan->limit) && (CanOverride(user,"LIMIT")))
{
if (NoisyOverride)
WriteChannelWithServ((char*)Srv->GetServerName().c_str(),chan,"NOTICE %s :%s passed through your channel limit",cname,user->nick);