[eggheads-patches] PATCH: consavefix.patch

Peter 'Rattacresh' Backes rtc at rhrk.uni-kl.de
Thu Oct 7 14:36:26 CST 1999


* Four more places where the new style console saves had been 
forgotten.
* .console incorrectly saved the console settings of the caller if a 
target nick was specified.


-- Peter 'Rattacresh' Backes, rtc at rhrk.uni-kl.de

-------------- next part --------------
diff -urN eggdrop1.3.29/doc/UPDATES1.3 eggdrop1.3.29+consavefix/doc/UPDATES1.3
--- eggdrop1.3.29/doc/UPDATES1.3	Thu Oct  7 17:00:07 1999
+++ eggdrop1.3.29+consavefix/doc/UPDATES1.3	Thu Oct  7 16:59:19 1999
@@ -4,6 +4,8 @@
 
 1.3.29
 Foundby   Fixedby   What....
+          rtc       .console saved the caller's settings if a target nick 
+                    was specified and some tcl funcs didn't save them at all
 Ben       Fabian    eggdrop.conf.dist now talks positively about allow-resync
           rtc       fixed .console to not allow channels starting with '*'.
 SuperS	  Fabian    if run with '-n', eggdrop now only prints every line once
diff -urN eggdrop1.3.29/src/cmds.c eggdrop1.3.29+consavefix/src/cmds.c
--- eggdrop1.3.29/src/cmds.c	Thu Oct  7 17:00:15 1999
+++ eggdrop1.3.29+consavefix/src/cmds.c	Thu Oct  7 16:57:07 1999
@@ -718,7 +718,7 @@
   /* new style autosave -- drummer,07/25/1999*/
   if ((me = module_find("console", 1, 1))) {
     Function *func = me->funcs;
-    (func[CONSOLE_DOSTORE]) (idx);
+    (func[CONSOLE_DOSTORE]) (dest);
   }
 }
 
diff -urN eggdrop1.3.29/src/tcldcc.c eggdrop1.3.29+consavefix/src/tcldcc.c
--- eggdrop1.3.29/src/tcldcc.c	Thu Oct  7 17:00:15 1999
+++ eggdrop1.3.29+consavefix/src/tcldcc.c	Thu Oct  7 16:51:05 1999
@@ -178,6 +178,7 @@
 static int tcl_setchan STDVAR
 {
   int idx, i, chan;
+  module_entry *me;
 
   context;
   BADARGS(3, 3, " idx channel");
@@ -227,6 +228,11 @@
     check_tcl_chjn(botnetnick, dcc[idx].nick, chan, geticon(idx),
 		   dcc[idx].sock, dcc[idx].host);
   }
+  /* new style autosave here too -- rtc, 10/07/1999*/
+  if ((me = module_find("console", 1, 1))) {
+    Function *func = me->funcs;
+    (func[CONSOLE_DOSTORE]) (idx);
+  }
   return TCL_OK;
 }
 
@@ -313,6 +319,7 @@
 static int tcl_strip STDVAR
 {
   int i, j, pls, arg;
+  module_entry *me;
 
   context;
   BADARGS(2, 4, " idx ?strip-flags?");
@@ -348,12 +355,18 @@
     }
   }
   Tcl_AppendElement(irp, stripmasktype(dcc[i].u.chat->strip_flags));
+  /* new style autosave here too -- rtc, 10/07/1999*/
+  if ((me = module_find("console", 1, 1))) {
+    Function *func = me->funcs;
+    (func[CONSOLE_DOSTORE]) (i);
+  }
   return TCL_OK;
 }
 
 static int tcl_echo STDVAR
 {
   int i, j;
+  module_entry *me;
 
   context;
   BADARGS(2, 3, " idx ?status?");
@@ -377,6 +390,11 @@
     Tcl_AppendResult(irp, "1", NULL);
   else
     Tcl_AppendResult(irp, "0", NULL);
+  /* new style autosave here too -- rtc, 10/07/1999*/
+  if ((me = module_find("console", 1, 1))) {
+    Function *func = me->funcs;
+    (func[CONSOLE_DOSTORE]) (i);
+  }
   return TCL_OK;
 }
 
@@ -384,6 +402,7 @@
 {
   int i, j;
   char x[20];
+  module_entry *me;
 
   context;
   BADARGS(2, 3, " idx ?status?");
@@ -412,6 +431,11 @@
     Tcl_AppendResult(irp, x, NULL);
   } else
     Tcl_AppendResult(irp, "0", NULL);
+  /* new style autosave here too -- rtc, 10/07/1999*/
+  if ((me = module_find("console", 1, 1))) {
+    Function *func = me->funcs;
+    (func[CONSOLE_DOSTORE]) (i);
+  }
   return TCL_OK;
 }
 


More information about the Patches mailing list