[cvslog] (2008-10-31 22:07:25 UTC) Module eggdrop1.6: Change committed!

cvslog cvs at tsss.org
Fri Oct 31 16:07:25 CST 2008


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2008-10-31 22:07:25 UTC
Commited by: Tothwolf <tothwolf at techmonkeys.org>

Modified files:
     doc/Changes1.6 src/cmds.c src/tcldcc.c src/users.c

Log message:

Fixed global variable names used with Tcl_SetVar() / Tcl_VarEval() --
Made assoc module use $_chan instead of $chan 
Made tell_user() use $_user instead of $user 

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.7 eggdrop1.6/doc/Changes1.6:1.8
--- eggdrop1.6/doc/Changes1.6:1.7	Fri Oct 31 13:10:59 2008
+++ eggdrop1.6/doc/Changes1.6	Fri Oct 31 17:07:14 2008
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.7 2008-10-31 18:10:59 tothwolf Exp $
+$Id: Changes1.6,v 1.8 2008-10-31 22:07:14 tothwolf Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,11 @@
 
 1.6.20 (CVS):
 
+  - Fixed global variable names used with Tcl_SetVar() / Tcl_VarEval() --
+    Made assoc module use $_chan instead of $chan 
+    Made tell_user() use $_user instead of $user 
+    Patch by: Tothwolf
+
   - Moved the variable declaration for tcl_maskhost() to the top of the
     function where it should be. FireEgl's tcl_maskhost patch prevented
     tcl_maskhost() from compiling with many non-GCC and older GCC compilers.
Index: eggdrop1.6/src/cmds.c
diff -u eggdrop1.6/src/cmds.c:1.116 eggdrop1.6/src/cmds.c:1.117
--- eggdrop1.6/src/cmds.c:1.116	Sat Feb 16 15:41:03 2008
+++ eggdrop1.6/src/cmds.c	Fri Oct 31 17:07:14 2008
@@ -3,7 +3,7 @@
  *   commands from a user via dcc
  *   (split in 2, this portion contains no-irc commands)
  *
- * $Id: cmds.c,v 1.116 2008-02-16 21:41:03 guppy Exp $
+ * $Id: cmds.c,v 1.117 2008-10-31 22:07:14 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -306,8 +306,8 @@
     int chan = -1;
 
     if ((par[0] < '0') || (par[0] > '9')) {
-      Tcl_SetVar(interp, "chan", par, 0);
-      if ((Tcl_VarEval(interp, "assoc ", "$chan", NULL) == TCL_OK) &&
+      Tcl_SetVar(interp, "_chan", par, 0);
+      if ((Tcl_VarEval(interp, "assoc ", "$_chan", NULL) == TCL_OK) &&
           interp->result[0]) {
         chan = atoi(interp->result);
       }
@@ -1807,8 +1807,8 @@
         if (!arg[1])
           newchan = 0;
         else {
-          Tcl_SetVar(interp, "chan", arg, 0);
-          if ((Tcl_VarEval(interp, "assoc ", "$chan", NULL) == TCL_OK) &&
+          Tcl_SetVar(interp, "_chan", arg, 0);
+          if ((Tcl_VarEval(interp, "assoc ", "$_chan", NULL) == TCL_OK) &&
               interp->result[0])
             newchan = atoi(interp->result);
           else
@@ -1830,8 +1830,8 @@
         if (!egg_strcasecmp(arg, "on"))
           newchan = 0;
         else {
-          Tcl_SetVar(interp, "chan", arg, 0);
-          if ((Tcl_VarEval(interp, "assoc ", "$chan", NULL) == TCL_OK) &&
+          Tcl_SetVar(interp, "_chan", arg, 0);
+          if ((Tcl_VarEval(interp, "assoc ", "$_chan", NULL) == TCL_OK) &&
               interp->result[0])
             newchan = atoi(interp->result);
           else
Index: eggdrop1.6/src/tcldcc.c
diff -u eggdrop1.6/src/tcldcc.c:1.61 eggdrop1.6/src/tcldcc.c:1.62
--- eggdrop1.6/src/tcldcc.c:1.61	Sat Feb 16 15:41:04 2008
+++ eggdrop1.6/src/tcldcc.c	Fri Oct 31 17:07:14 2008
@@ -2,7 +2,7 @@
  * tcldcc.c -- handles:
  *   Tcl stubs for the dcc commands
  *
- * $Id: tcldcc.c,v 1.61 2008-02-16 21:41:04 guppy Exp $
+ * $Id: tcldcc.c,v 1.62 2008-10-31 22:07:14 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -203,8 +203,8 @@
     if (!strcmp(argv[2], "-1") || !egg_strcasecmp(argv[2], "off"))
       chan = -1;
     else {
-      Tcl_SetVar(irp, "chan", argv[2], 0);
-      if (Tcl_VarEval(irp, "assoc ", "$chan", NULL) != TCL_OK ||
+      Tcl_SetVar(irp, "_chan", argv[2], 0);
+      if (Tcl_VarEval(irp, "assoc ", "$_chan", NULL) != TCL_OK ||
           !interp->result[0]) {
         Tcl_AppendResult(irp, "channel name is invalid", NULL);
         return TCL_ERROR;
@@ -658,8 +658,8 @@
     chan = -1;
   else {
     if ((argv[1][0] < '0') || (argv[1][0] > '9')) {
-      Tcl_SetVar(interp, "chan", argv[1], 0);
-      if ((Tcl_VarEval(interp, "assoc ", "$chan", NULL) != TCL_OK) ||
+      Tcl_SetVar(interp, "_chan", argv[1], 0);
+      if ((Tcl_VarEval(interp, "assoc ", "$_chan", NULL) != TCL_OK) ||
           !interp->result[0]) {
         Tcl_AppendResult(irp, "channel name is invalid", NULL);
         return TCL_ERROR;
Index: eggdrop1.6/src/users.c
diff -u eggdrop1.6/src/users.c:1.51 eggdrop1.6/src/users.c:1.52
--- eggdrop1.6/src/users.c:1.51	Sat Feb 16 15:41:05 2008
+++ eggdrop1.6/src/users.c	Fri Oct 31 17:07:14 2008
@@ -10,7 +10,7 @@
  *
  * dprintf'ized, 9nov1995
  *
- * $Id: users.c,v 1.51 2008-02-16 21:41:05 guppy Exp $
+ * $Id: users.c,v 1.52 2008-10-31 22:07:14 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -485,8 +485,8 @@
   fr.udef_global = u->flags_udef;
   build_flags(s, &fr, NULL);
   if (module_find("notes", 0, 0)) {
-    Tcl_SetVar(interp, "user", u->handle, 0);
-    if (Tcl_VarEval(interp, "notes ", "$user", NULL) == TCL_OK)
+    Tcl_SetVar(interp, "_user", u->handle, 0);
+    if (Tcl_VarEval(interp, "notes ", "$_user", NULL) == TCL_OK)
       n = atoi(interp->result);
   }
   li = get_user(&USERENTRY_LASTON, u);
----------------------- End of diff -----------------------



More information about the Changes mailing list