[cvslog] (2004-04-07 13:00:49 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Wed Apr 7 07:00:49 CST 2004


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2004-04-07 13:00:49 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/misc.c src/patch.h

Log message:

* Fixed a crash in putlog() that appears when timestamps are turned off.
  Patch by darko``.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.546 eggdrop1.6/doc/UPDATES1.6:1.547
--- eggdrop1.6/doc/UPDATES1.6:1.546	Tue Apr  6 02:15:18 2004
+++ eggdrop1.6/doc/UPDATES1.6	Wed Apr  7 08:00:39 2004
@@ -1,4 +1,4 @@
-$Id: UPDATES1.6,v 1.546 2004/04/06 07:15:18 wcc Exp $
+$Id: UPDATES1.6,v 1.547 2004/04/07 13:00:39 wcc Exp $
 
 Eggdrop Changes (since v1.6.0)
      _________________________________________________________________
@@ -11,6 +11,9 @@
     ftp://ftp.eggheads.org/pub/eggdrop/UPDATES/
 
   1.6.16:
+    - Fixed a crash in putlog() that appears when timestamps are turned off.
+    * Patch by: darko``
+
     - Rewrote isowner() completely.
     * Patch by: Sup
 
Index: eggdrop1.6/src/misc.c
diff -u eggdrop1.6/src/misc.c:1.70 eggdrop1.6/src/misc.c:1.71
--- eggdrop1.6/src/misc.c:1.70	Tue Apr  6 01:56:38 2004
+++ eggdrop1.6/src/misc.c	Wed Apr  7 08:00:39 2004
@@ -7,7 +7,7 @@
  *   help system
  *   motd display and %var substitution
  *
- * $Id: misc.c,v 1.70 2004/04/06 06:56:38 wcc Exp $
+ * $Id: misc.c,v 1.71 2004/04/07 13:00:39 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -504,7 +504,7 @@
   char *format, *chname, s[LOGLINELEN], s1[256], *out, ct[81], *s2, stamp[34];
   va_list va;
   time_t now2 = time(NULL);
-  struct tm *t;
+  struct tm *t = localtime(&now2);
 
   type = EGG_VARARGS_START(int, arg1, va);
   chname = va_arg(va, char *);
@@ -517,9 +517,11 @@
     strcat(stamp, " ");
     tsl = strlen(stamp);
   }
+  else
+    *stamp = '\0';
 
   /* Format log entry at offset 'tsl,' then i can prepend the timestamp */
-  out = s+tsl;
+  out = s + tsl;
   /* No need to check if out should be null-terminated here,
    * just do it! <cybah>
    */
@@ -541,7 +543,7 @@
     }
   }
   /* Place the timestamp in the string to be printed */
-  if ((out[0]) && (shtime)) {
+  if (out[0] && shtime) {
     strncpy(s, stamp, tsl);
     out = s;
   }
@@ -589,13 +591,15 @@
       }
     }
   }
-  for (i = 0; i < dcc_total; i++)
+  for (i = 0; i < dcc_total; i++) {
     if ((dcc[i].type == &DCC_CHAT) && (dcc[i].u.chat->con_flags & type)) {
       if ((chname[0] == '*') || (dcc[i].u.chat->con_chan[0] == '*') ||
-          (!rfc_casecmp(chname, dcc[i].u.chat->con_chan)))
+          !rfc_casecmp(chname, dcc[i].u.chat->con_chan)) {
         dprintf(i, "%s", out);
+      }
     }
-  if ((!backgrd) && (!con_chan) && (!term_z))
+  }
+  if (!backgrd && !con_chan && !term_z)
     dprintf(DP_STDOUT, "%s", out);
   else if ((type & LOG_MISC) && use_stderr) {
     if (shtime)
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1064 eggdrop1.6/src/patch.h:1.1065
--- eggdrop1.6/src/patch.h:1.1064	Tue Apr  6 02:15:18 2004
+++ eggdrop1.6/src/patch.h	Wed Apr  7 08:00:39 2004
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1064 2004/04/06 07:15:18 wcc Exp $
+ * $Id: patch.h,v 1.1065 2004/04/07 13:00:39 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1081235686");            /* current unixtime */
+patch("1081342817");            /* current unixtime */
 /*
  *
  *
  */
-patch("isowner-rewrite");
+patch("putlog-timestamp");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list