X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fgline.c;h=f294d99f456f07694a4c5fd5e22324339c299ebd;hb=0a448eb4337cd92f8eeb21d9560506eb384ad69d;hp=5ee69e1209187d90b7580d82e46c8c04b9980919;hpb=ce37acbb6cddd7366b24779050dceb490b484d65;p=ircu2.10.12-pk.git diff --git a/ircd/gline.c b/ircd/gline.c index 5ee69e1..f294d99 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -142,6 +142,8 @@ make_gline(char *user, char *host, char *reason, time_t expire, time_t lastmod, { struct Gline *gline; + assert(0 != expire); + gline = (struct Gline *)MyMalloc(sizeof(struct Gline)); /* alloc memory */ assert(0 != gline); @@ -453,10 +455,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) <