[eggheads-patches] PATCH: preset.patch

Dobos Lorant drummer at sophia.jpte.hu
Mon Oct 11 13:28:41 CST 1999


diff -ur eggdrop1.3.1006/eggdrop.conf.dist eggdrop1.3/eggdrop.conf.dist
--- eggdrop1.3.1006/eggdrop.conf.dist	Tue Oct  6 21:26:10 1998
+++ eggdrop1.3/eggdrop.conf.dist	Sun Oct 10 19:22:00 1999
@@ -658,8 +658,6 @@
 # answer HOW MANY stacked ctcp's at once
 set answer-ctcp 3
 
-# *NOTE* due to lazyness on beldin's behalf, these must be set *after*
-# server.so is loaded
 # setting any of the following with howmany == 0 will turn them off
 # how many msgs in how many seconds from the same host constitutes a flood?
 set flood-msg 5:60
diff -ur eggdrop1.3.1006/src/tcl.c eggdrop1.3/src/tcl.c
--- eggdrop1.3.1006/src/tcl.c	Tue Oct  6 21:26:10 1998
+++ eggdrop1.3/src/tcl.c	Sun Oct 10 19:15:22 1999
@@ -549,23 +549,6 @@
   strinfo *st;
 
   for (i = 0; list[i].name; i++) {
-    if (list[i].length > 0) {
-      char *p = Tcl_GetVar(interp, list[i].name, TCL_GLOBAL_ONLY);
-
-      if (p != NULL) {
-	strncpy(list[i].buf, p, list[i].length);
-	list[i].buf[list[i].length] = 0;
-	if (list[i].flags & STR_DIR) {
-	  int x = strlen(list[i].buf);
-
-	  if ((x > 0) && (x < (list[i].length - 1)) &&
-	      (list[i].buf[x - 1] != '/')) {
-	    list[i].buf[x++] = '/';
-	    list[i].buf[x] = 0;
-	  }
-	}
-      }
-    }
     st = (strinfo *) nmalloc(sizeof(strinfo));
     strtot += sizeof(strinfo);
     st->max = list[i].length - (list[i].flags & STR_DIR);
@@ -573,6 +556,7 @@
       st->max = -st->max;
     st->str = list[i].buf;
     st->flags = (list[i].flags & STR_DIR);
+    tcl_eggstr((ClientData) st, interp, list[i].name, NULL, TCL_TRACE_WRITES);
     Tcl_TraceVar(interp, list[i].name, TCL_TRACE_READS | TCL_TRACE_WRITES |
 		 TCL_TRACE_UNSETS, tcl_eggstr, (ClientData) st);
   }
@@ -605,14 +589,11 @@
   intinfo *ii;
 
   for (i = 0; list[i].name; i++) {
-    char *p = Tcl_GetVar(interp, list[i].name, TCL_GLOBAL_ONLY);
-
-    if (p != NULL)
-      *(list[i].val) = atoi(p);
     ii = nmalloc(sizeof(intinfo));
     strtot += sizeof(intinfo);
     ii->var = list[i].val;
     ii->ro = list[i].readonly;
+    tcl_eggint((ClientData) ii, interp, list[i].name, NULL, TCL_TRACE_WRITES);
     Tcl_TraceVar(interp, list[i].name,
 		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
 		 tcl_eggint, (ClientData) ii);
@@ -652,6 +633,7 @@
     strtot += sizeof(coupletinfo);
     cp->left = list[i].lptr;
     cp->right = list[i].rptr;
+    tcl_eggcouplet((ClientData) cp, interp, list[i].name, NULL, TCL_TRACE_WRITES);
     Tcl_TraceVar(interp, list[i].name,
 		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
 		 tcl_eggcouplet, (ClientData) cp);


More information about the Patches mailing list