[cvslog] [CVS] Module eggdrop1.6: Change committed

cvs at eggheads.org cvs at eggheads.org
Mon Jun 28 15:13:36 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2010-06-28 21:13:36 UTC
Committer  : Thomas Sader <thommey at gmail.com>

Modified files:
     doc/Changes1.6 scripts/compat.tcl src/patch.h

Log message:

Modified compat.tcl version of time to allow accessing Tcl's time command if any arguments are passed to it.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.80 eggdrop1.6/doc/Changes1.6:1.81
--- eggdrop1.6/doc/Changes1.6:1.80	Sat Jun 26 14:26:05 2010
+++ eggdrop1.6/doc/Changes1.6	Mon Jun 28 15:13:26 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.80 2010/06/26 20:26:05 pseudo Exp $
+$Id: Changes1.6,v 1.81 2010/06/28 21:13:26 thommey Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,10 @@
 
 1.6.20 (CVS):
 
+  - Modified compat.tcl version of time to allow accessing Tcl's time
+    command if any arguments are passed to it.
+    Patch by: Pixelz
+
   - Removed root uid check when compiled on Cygwin, as it was reported to
     cause problems for some cygwin installations, while it doesn't provide
     any protection, as administrator accounts appear as non-zero uids anyway.
Index: eggdrop1.6/scripts/compat.tcl
diff -u eggdrop1.6/scripts/compat.tcl:1.17 eggdrop1.6/scripts/compat.tcl:1.18
--- eggdrop1.6/scripts/compat.tcl:1.17	Sun Jan  3 07:27:31 2010
+++ eggdrop1.6/scripts/compat.tcl	Mon Jun 28 15:13:26 2010
@@ -10,8 +10,9 @@
 # Tothwolf  06Oct1999: optimized
 # rtc       10Oct1999: added [set|get][dn|up]loads functions
 # pseudo    04Oct2009: added putdccraw
+# Pixelz    08Apr2010: changed [time] to be compatible with Tcl [time]
 #
-# $Id: compat.tcl,v 1.17 2010/01/03 13:27:31 pseudo Exp $
+# $Id: compat.tcl,v 1.18 2010/06/28 21:13:26 thommey Exp $
 
 proc gethosts {hand} {
   getuser $hand HOSTS
@@ -80,8 +81,20 @@
   lindex [getuser $hand LASTON] 1
 }
 
-proc time {} {
-  strftime "%H:%M"
+if {![llength [info commands {TCLTIME}]] && [llength [info commands {time}]]} {
+  rename time TCLTIME
+}
+
+proc time {args} {
+  if {([llength $args] != 0) && [llength [info commands {TCLTIME}]]} {
+    if {[llength [info commands {uplevel}]]} {
+      uplevel 1 TCLTIME $args
+    } else {
+      eval TCLTIME $args
+    }
+  } else {
+    strftime "%H:%M"
+  }
 }
 
 proc date {} {
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1248 eggdrop1.6/src/patch.h:1.1249
--- eggdrop1.6/src/patch.h:1.1248	Sat Jun 26 14:26:05 2010
+++ eggdrop1.6/src/patch.h	Mon Jun 28 15:13:26 2010
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1248 2010/06/26 20:26:05 pseudo Exp $
+ * $Id: patch.h,v 1.1249 2010/06/28 21:13:26 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1277580344");            /* current unixtime */
+patch("1277758126");            /* current unixtime */
 /*
  *
  *
  */
-patch("cygroot");
+patch("tcltime");
 /*
  *
  *
----------------------- End of diff -----------------------


More information about the Changes mailing list