Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / gline.c
index 5ee69e1209187d90b7580d82e46c8c04b9980919..fd63607159dd3f1bd4c3392d9232524b41dda0c6 100644 (file)
@@ -453,10 +453,12 @@ gline_add(struct Client *cptr, struct Client *sptr, char *userhost,
     }
     user = userhost;
     host = NULL;
-    tmp = count_realnames(userhost + 2);
-    if ((tmp >= feature_int(FEAT_GLINEMAXUSERCOUNT))
-        && !(flags & GLINE_OPERFORCE))
-      return send_reply(sptr, ERR_TOOMANYUSERS, tmp);
+    if (MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) {
+      tmp = count_realnames(userhost + 2);
+      if ((tmp >= feature_int(FEAT_GLINEMAXUSERCOUNT))
+         && !(flags & GLINE_OPERFORCE))
+       return send_reply(sptr, ERR_TOOMANYUSERS, tmp);
+    }
   } else {
     canon_userhost(userhost, &user, &host, "*");
     if (sizeof(uhmask) <