From: Kevin L. Mitchell Date: Mon, 11 Dec 2000 20:27:14 +0000 (+0000) Subject: Author: Kev X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=3f20d184b58e9c9e7cdce991e6007f5f674a130d Author: Kev Log message: Fix a G-line bug reported by maniac@cetlink.net in private email. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@333 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 6f7b071..ce78b49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-12-11 Kevin L. Mitchell + + * ircd/gline.c: When Uworld removed Uworld-set G-lines, only the + uplink would remove them. This is because the removal protocol + message wasn't being sent to the uplinks. This is fixed by fixing + propagate_gline() to send the proper number of arguments depending + on whether or not we're adding or deleting the Uworld gline, and + by having gline_deactivate() make sure to turn off the active bit + and call propagate_gline() if it's a Uworld gline + 2000-12-10 Kevin L. Mitchell * ircd/os_generic.c: make sure IOV_MAX gets defined, just in case diff --git a/ircd/gline.c b/ircd/gline.c index f32671b..7cd6655 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -213,9 +213,10 @@ propagate_gline(struct Client *cptr, struct Client *sptr, struct Gline *gline) gline->gl_expire - CurrentTime, gline->gl_lastmod, gline->gl_reason); else - sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s%s%s %Tu :%s", - GlineIsRemActive(gline) ? '+' : '-', gline->gl_user, - GlineIsBadChan(gline) ? "" : "@", + sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, + (GlineIsRemActive(gline) ? + "* +%s%s%s %Tu :%s" : "* -%s%s%s"), + gline->gl_user, GlineIsBadChan(gline) ? "" : "@", GlineIsBadChan(gline) ? "" : gline->gl_host, gline->gl_expire - CurrentTime, gline->gl_reason); } @@ -342,9 +343,10 @@ gline_deactivate(struct Client *cptr, struct Client *sptr, struct Gline *gline, if (GlineIsLocal(gline)) msg = "removing local"; - else if (!gline->gl_lastmod && !(flags & GLINE_LOCAL)) + else if (!gline->gl_lastmod && !(flags & GLINE_LOCAL)) { msg = "removing global"; - else { + gline->gl_flags &= ~GLINE_ACTIVE; /* propagate a - */ + } else { msg = "deactivating global"; if (flags & GLINE_LOCAL) @@ -378,11 +380,13 @@ gline_deactivate(struct Client *cptr, struct Client *sptr, struct Gline *gline, GlineIsBadChan(gline) ? "" : gline->gl_host, gline->gl_expire + TSoffset, gline->gl_reason); - if (GlineIsLocal(gline) || (!gline->gl_lastmod && !(flags & GLINE_LOCAL))) - gline_free(gline); - else if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */ + if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */ propagate_gline(cptr, sptr, gline); + /* if it's a local gline or a Uworld gline (and not locally deactivated).. */ + if (GlineIsLocal(gline) || (!gline->gl_lastmod && !(flags & GLINE_LOCAL))) + gline_free(gline); /* get rid of it */ + return 0; }