From c6a12e857af384689fdc0cd478da1714bb9b16aa Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 4 Nov 2012 17:23:27 +0000 Subject: - Fixed class limits for oper{} blocks git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1637 82007160-df01-0410-b94d-b575c5fd34c7 --- src/conf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/conf.c b/src/conf.c index 030a868..a0d5171 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1185,8 +1185,6 @@ find_exact_name_conf(enum maskitem_type type, const struct Client *who, const ch if (!irccmp(conf->name, name)) { - if (conf->class->ref_count >= conf->class->max_total) - continue; if (!who) return conf; if (EmptyString(conf->user) || EmptyString(conf->host)) @@ -1197,18 +1195,21 @@ find_exact_name_conf(enum maskitem_type type, const struct Client *who, const ch { case HM_HOST: if (match(conf->host, who->host) || match(conf->host, who->sockhost)) - return conf; + if (!conf->class->max_total || conf->class->ref_count < conf->class->max_total) + return conf; break; case HM_IPV4: if (who->localClient->aftype == AF_INET) if (match_ipv4(&who->localClient->ip, &conf->addr, conf->bits)) - return conf; + if (!conf->class->max_total || conf->class->ref_count < conf->class->max_total) + return conf; break; #ifdef IPV6 case HM_IPV6: if (who->localClient->aftype == AF_INET6) if (match_ipv6(&who->localClient->ip, &conf->addr, conf->bits)) - return conf; + if (!conf->class->max_total || conf->class->ref_count < conf->class->max_total) + return conf; break; #endif default: -- cgit