[cvslog] (2005-11-17 05:21:45 UTC) Module eggdrop1.6: Change committed!

cvslog cvs at tsss.org
Wed Nov 16 23:21:45 CST 2005


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2005-11-17 05:21:44 UTC
Commited by: Tothwolf <tothwolf at techmonkeys.org>

Modified files:
     src/tclhash.c

Log message:

* Synchronized working tree tclhash.c with CVS.
* Removed redundant Tcl_SetVar() lastbind that was from a submitted patch.     

---------------------- diff included ----------------------
Index: eggdrop1.6/src/tclhash.c
diff -u eggdrop1.6/src/tclhash.c:1.56 eggdrop1.6/src/tclhash.c:1.57
--- eggdrop1.6/src/tclhash.c:1.56	Sun Aug 28 23:39:24 2005
+++ eggdrop1.6/src/tclhash.c	Wed Nov 16 23:21:34 2005
@@ -7,7 +7,7 @@
  *   (non-Tcl) procedure lookups for msg/dcc/file commands
  *   (Tcl) binding internal procedures to msg/dcc/file commands
  *
- * $Id: tclhash.c,v 1.56 2005/08/29 04:39:24 wcc Exp $
+ * $Id: tclhash.c,v 1.57 2005/11/17 05:21:34 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -669,7 +669,7 @@
                                char *mask)
 {
   int x;
-  #ifdef DEBUG_CONTEXT
+#ifdef DEBUG_CONTEXT
   const char *msg = "Tcl proc: %s, param: %s";
   char *buf;
 
@@ -684,11 +684,16 @@
   ContextNote(buf);
   nfree(buf);
 #endif /* DEBUG_CONTEXT */
+
+  /* Set the lastbind variable before evaluating the proc so that the name
+   * of the command that triggered the bind will be available to the proc.
+   * This feature is used by scripts such as userinfo.tcl
+   */
   Tcl_SetVar(interp, "lastbind", (char *) mask, TCL_GLOBAL_ONLY);
+
   x = Tcl_VarEval(interp, proc, param, NULL);
   Context;
 
-
   if (x == TCL_ERROR) {
     /* FIXME: we really should be able to log longer errors */
     if (strlen(interp->result) > 400)
@@ -811,8 +816,11 @@
            *       BIND_STACKRET will only be used for stackable binds.
            */
 
+          /* We will only return if BIND_ALTER_ARGS or BIND_WANTRET was
+           * specified because we want to trigger all binds in a stack.
+           */
+
           tc->hits++;
-          Tcl_SetVar(interp, "lastbind", (char *) tm->mask, TCL_GLOBAL_ONLY);
           x = trigger_bind(tc->func_name, param, tm->mask);
 
           if (match_type & BIND_ALTER_ARGS) {
----------------------- End of diff -----------------------



More information about the Changes mailing list