[cvslog] (2003-01-18 22:37:02 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sat Jan 18 16:38:00 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2003-01-18 22:37:02 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 lib/eggdrop/module.h modules/irc/chan.c
     src/dccutil.c src/dccutil.h src/logfile.c src/modules.c
     src/patch.h src/tcldcc.c src/tclmisc.c

Log message:

* Synch 1.6: nickbind, unixtime_incr, transfer-close, logblocking.

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/UPDATES1.6
diff -u eggdrop1.7/doc/UPDATES1.6:1.206 eggdrop1.7/doc/UPDATES1.6:1.207
--- eggdrop1.7/doc/UPDATES1.6:1.206	Fri Dec 27 17:07:53 2002
+++ eggdrop1.7/doc/UPDATES1.6	Sat Jan 18 16:36:52 2003
@@ -1,10 +1,22 @@
-$Id: UPDATES1.6,v 1.206 2002/12/27 23:07:53 wcc Exp $
+$Id: UPDATES1.6,v 1.207 2003/01/18 22:36:52 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.14
 Found by  Fixed by  What...
+fbs       fbs/      open file descriptors are now closed when the killdcc Tcl
+          Wcc       command is used on a transfer socket
+never     Wcc       unixtime was not increased when eggdrop was blocked during
+                    a series of in-line Tcl commands
+lee       Wcc       exported getchanmode()
+various   darko``   removed strict-servernames -- $server is now always the
+                    server's realname and $serveraddress is it's server list
+                    entry
+          BarkerJr  bind NICK now gets triggered even if the nickname isn't
+                    found in any channels (i.e. when the bot's nickname changes
+                    before it joins channels)
+          darko``   fixed parsing of userhosts in gotwall()
 reed      Wcc       updated UnderNet's max_bans to 45
 various   BarkerJr  config file updates
 various   Wcc/      removed quoting support from wild_match() which fixes several
Index: eggdrop1.7/lib/eggdrop/module.h
diff -u eggdrop1.7/lib/eggdrop/module.h:1.34 eggdrop1.7/lib/eggdrop/module.h:1.35
--- eggdrop1.7/lib/eggdrop/module.h:1.34	Thu Jan  2 15:33:13 2003
+++ eggdrop1.7/lib/eggdrop/module.h	Sat Jan 18 16:36:52 2003
@@ -20,7 +20,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: module.h,v 1.34 2003/01/02 21:33:13 wcc Exp $
+ * $Id: module.h,v 1.35 2003/01/18 22:36:52 wcc Exp $
  */
 
 #ifndef _EGG_MOD_MODULE_H
@@ -362,6 +362,7 @@
 /* 276 - 279 */
 /* 280 - 283 */
 #define egg_timeval_now (*(egg_timeval_t *)egg->global[281])
+#define killtransfer ((void(*)(int))global[283])
 
 /* This is for blowfish module, couldnt be bothered making a whole new .h
  * file for it ;)
Index: eggdrop1.7/modules/irc/chan.c
diff -u eggdrop1.7/modules/irc/chan.c:1.28 eggdrop1.7/modules/irc/chan.c:1.29
--- eggdrop1.7/modules/irc/chan.c:1.28	Thu Jan  2 15:33:14 2003
+++ eggdrop1.7/modules/irc/chan.c	Sat Jan 18 16:36:52 2003
@@ -28,7 +28,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: chan.c,v 1.28 2003/01/02 21:33:14 wcc Exp $";
+static const char rcsid[] = "$Id: chan.c,v 1.29 2003/01/18 22:36:52 wcc Exp $";
 #endif
 */
 
@@ -1894,6 +1894,7 @@
 static int gotnick(char *from, char *ignore, char *msg)
 {
   char buf[UHOSTLEN], *nick, *chname, *uhost, s1[UHOSTLEN];
+  unsigned char found = 0;
   memberlist *m, *mm;
   struct chanset_t *chan, *oldchan = NULL;
   struct userrec *u;
@@ -1949,6 +1950,7 @@
       }
       u = get_user_by_host(from); /* make sure this is in the loop, someone could have changed the record
                                      in an earlier iteration of the loop */
+      found = 1;
       check_tcl_nick(nick, uhost, u, chan->dname, msg);
       if (!findchan_by_dname(chname)) {
 	chan = oldchan;
@@ -1956,6 +1958,13 @@
       }
     }
   }
+  if (!found)
+  {
+    u = get_user_by_host(from);
+    s1[0] = '*';
+    s1[1] = 0;
+    check_tcl_nick(nick, uhost, u, s1, msg);
+   }
   return 0;
 }
 
Index: eggdrop1.7/src/dccutil.c
diff -u eggdrop1.7/src/dccutil.c:1.57 eggdrop1.7/src/dccutil.c:1.58
--- eggdrop1.7/src/dccutil.c:1.57	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/dccutil.c	Sat Jan 18 16:36:52 2003
@@ -27,7 +27,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: dccutil.c,v 1.57 2003/01/02 21:33:16 wcc Exp $";
+static const char rcsid[] = "$Id: dccutil.c,v 1.58 2003/01/18 22:36:52 wcc Exp $";
 #endif
 
 #include <sys/stat.h>
@@ -235,6 +235,15 @@
     }
   }
 }
+
+/* Closes an open FD for transfer sockets. */
+void killtransfer(int n)
+{
+	if (dcc[n].u.xfer->f) {
+		fclose(dcc[n].u.xfer->f);
+		dcc[n].u.xfer->f = NULL;
+	}
+ }
 
 /* Mark an entry as lost and deconstruct it's contents. It will be securely
  * removed from the dcc list in the main loop.
Index: eggdrop1.7/src/dccutil.h
diff -u eggdrop1.7/src/dccutil.h:1.4 eggdrop1.7/src/dccutil.h:1.5
--- eggdrop1.7/src/dccutil.h:1.4	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/dccutil.h	Sat Jan 18 16:36:52 2003
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: dccutil.h,v 1.4 2003/01/02 21:33:16 wcc Exp $
+ * $Id: dccutil.h,v 1.5 2003/01/18 22:36:52 wcc Exp $
  */
 
 #ifndef _EGG_DCCUTIL_H
@@ -43,6 +43,7 @@
 extern void (*sharein) (int, char *);
 void chanout_but EGG_VARARGS(int, arg1);
 void dcc_chatter(int);
+void killtransfer(int);
 void lostdcc(int);
 void makepass(char *);
 void tell_dcc(int);
Index: eggdrop1.7/src/logfile.c
diff -u eggdrop1.7/src/logfile.c:1.24 eggdrop1.7/src/logfile.c:1.25
--- eggdrop1.7/src/logfile.c:1.24	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/logfile.c	Sat Jan 18 16:36:52 2003
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: logfile.c,v 1.24 2003/01/02 21:33:16 wcc Exp $";
+static const char rcsid[] = "$Id: logfile.c,v 1.25 2003/01/18 22:36:52 wcc Exp $";
 #endif
 
 #include "main.h"
@@ -104,8 +104,10 @@
 
 static int get_timestamp(char *t)
 {
+	time_t now2 = time(NULL);
+
 	/* Calculate timestamp. */
-	strftime(t, 32, "[%H:%M] ", localtime(&now));
+	strftime(t, 32, "[%H:%M] ", localtime(&now2));
 	return(0);
 }
 
Index: eggdrop1.7/src/modules.c
diff -u eggdrop1.7/src/modules.c:1.122 eggdrop1.7/src/modules.c:1.123
--- eggdrop1.7/src/modules.c:1.122	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/modules.c	Sat Jan 18 16:36:52 2003
@@ -25,7 +25,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: modules.c,v 1.122 2003/01/02 21:33:16 wcc Exp $";
+static const char rcsid[] = "$Id: modules.c,v 1.123 2003/01/18 22:36:52 wcc Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -523,6 +523,7 @@
   0,
   (Function) &egg_timeval_now,
   0,
+  (Function) killtranfer,
 };
 
 static bind_table_t *BT_load, *BT_unload;
Index: eggdrop1.7/src/patch.h
diff -u eggdrop1.7/src/patch.h:1.595 eggdrop1.7/src/patch.h:1.596
--- eggdrop1.7/src/patch.h:1.595	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/patch.h	Sat Jan 18 16:36:52 2003
@@ -30,7 +30,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: patch.h,v 1.595 2003/01/02 21:33:16 wcc Exp $
+ * $Id: patch.h,v 1.596 2003/01/18 22:36:52 wcc Exp $
  */
 
 #ifndef _EGG_PATCH_H
@@ -44,12 +44,12 @@
  *
  *
  */
-patch("1041542985");          /* current unixtime */
+patch("1042929232");          /* current unixtime */
   /*
    *
    *
    */
-patch("2003-copyright");
+patch("synch1.6-01-18-03");
 /*
  *
  *
Index: eggdrop1.7/src/tcldcc.c
diff -u eggdrop1.7/src/tcldcc.c:1.69 eggdrop1.7/src/tcldcc.c:1.70
--- eggdrop1.7/src/tcldcc.c:1.69	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/tcldcc.c	Sat Jan 18 16:36:52 2003
@@ -23,7 +23,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: tcldcc.c,v 1.69 2003/01/02 21:33:16 wcc Exp $";
+static const char rcsid[] = "$Id: tcldcc.c,v 1.70 2003/01/18 22:36:52 wcc Exp $";
 #endif
 
 #include "main.h"
@@ -254,19 +254,17 @@
 {
 	if (idx < 0 || idx >= dcc_total || !dcc[idx].type || !(dcc[idx].type->flags & DCT_VALIDIDX)) return(-1);
 
-  /* Don't kill terminal socket */
-  if ((dcc[idx].sock == STDOUT) && !backgrd) return(0);
+	/* Don't kill terminal socket */
+	if ((dcc[idx].sock == STDOUT) && !backgrd) return(0);
 
-  /* Make sure 'whom' info is updated for other bots */
-  if (dcc[idx].type->flags & DCT_CHAT) {
-    chanout_but(idx, dcc[idx].u.chat->channel, "*** %s has left the %s%s%s\n",
-		dcc[idx].nick, dcc[idx].u.chat ? "channel" : "partyline",
-		reason ? ": " : "", reason ? reason : "");
-    /* Notice is sent to the party line, the script can add a reason. */
-  }
-  killsock(dcc[idx].sock);
-  lostdcc(idx);
-  return TCL_OK;
+	/* Make sure 'whom' info is updated for other bots */
+	if (dcc[idx].type->flags & DCT_CHAT) chanout_but(idx, dcc[idx].u.chat->channel, "*** %s has left the %s%s%s\n", dcc[idx].nick, dcc[idx].u.chat ? "channel" : "partyline", reason ? ": " : "", reason ? reason : "");
+	/* Notice is sent to the party line, the script can add a reason. */
+
+	killsock(dcc[idx].sock);
+	killtransfer(idx);
+	lostdcc(idx);
+	return(TCL_OK);
 }
 
 static char *script_idx2hand(int idx)
Index: eggdrop1.7/src/tclmisc.c
diff -u eggdrop1.7/src/tclmisc.c:1.58 eggdrop1.7/src/tclmisc.c:1.59
--- eggdrop1.7/src/tclmisc.c:1.58	Thu Jan  2 15:33:16 2003
+++ eggdrop1.7/src/tclmisc.c	Sat Jan 18 16:36:52 2003
@@ -23,10 +23,11 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: tclmisc.c,v 1.58 2003/01/02 21:33:16 wcc Exp $";
+static const char rcsid[] = "$Id: tclmisc.c,v 1.59 2003/01/18 22:36:52 wcc Exp $";
 #endif
 
 #include <sys/stat.h>
+#include <time.h>
 #include "main.h"
 #include "modules.h"
 #include "core_binds.h"
@@ -87,7 +88,7 @@
 
 static unsigned int script_unixtime()
 {
-	return(now);
+	return(time(NULL));
 }
 
 static char *script_ctime(unsigned int sec)
----------------------- End of diff -----------------------



More information about the Changes mailing list