Fix SF bug #2721107 (Gline lifetime changes from servers change the reason.)
authorMichael Poole <mdpoole@troilus.org>
Mon, 6 Jul 2009 01:41:45 +0000 (01:41 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 6 Jul 2009 01:41:45 +0000 (01:41 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1916 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_gline.c

index 01670841f1cc524af6bec16ce7aa667dedaaba33..f119950d43091a8e3db9e0d0039124a0dd66db90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-05  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_gline.c (ms_gline): Fix the sense of the test for
+       strtoul() when parsing G-line lifetimes -- zero indicates failure.
+
 2009-07-05  Michael Poole <mdpoole@troilus.org>
 
        * ircd/channel.c (mode_parse_client): Ignore anything after a
 2009-07-05  Michael Poole <mdpoole@troilus.org>
 
        * ircd/channel.c (mode_parse_client): Ignore anything after a
index d379c611076d2ba675a3769cf57baec00d924587..549ae140db667df9ebac742cc6efb0ec0ec25635 100644 (file)
@@ -1,4 +1,4 @@
-/*
+\/*
  * IRC - Internet Relay Chat, ircd/m_gline.c
  * Copyright (C) 1990 Jarkko Oikarinen and
  *                    University of Oulu, Computing Center
  * IRC - Internet Relay Chat, ircd/m_gline.c
  * Copyright (C) 1990 Jarkko Oikarinen and
  *                    University of Oulu, Computing Center
@@ -308,7 +308,7 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
        if (!agline || /* gline creation, has to be the reason */
            /* trial-convert as lifetime, and if it doesn't fully convert,
             * it must be the reason */
        if (!agline || /* gline creation, has to be the reason */
            /* trial-convert as lifetime, and if it doesn't fully convert,
             * it must be the reason */
-           ((lifetime = strtoul(parv[5], &tmp, 10)) && !*tmp)) {
+           (!(lifetime = strtoul(parv[5], &tmp, 10)) && !*tmp)) {
          lifetime = 0;
          reason = parv[5];
 
          lifetime = 0;
          reason = parv[5];