[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Sun Sep 23 23:26:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-09-24 04:25:51 UTC
Commited by: Jeff Fisher <guppy at techmonkeys.org>

Modified files:
     eggdrop.complete.conf doc/UPDATES1.6 doc/html/egg-core.html
     doc/settings/core.settings language/core.english.lang
     language/core.french.lang language/core.german.lang
     src/chanprog.c src/dcc.c src/lang.h src/main.c src/modules.c
     src/patch.h src/tcl.c src/mod/module.h
     src/mod/filesys.mod/filesys.c src/mod/server.mod/server.c
     src/mod/server.mod/servmsg.c text/banner text/motd

Log message:

here are some backports from 1.7 to 1.6 .. mostly minor

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.181 eggdrop1.6/doc/UPDATES1.6:1.182
--- eggdrop1.6/doc/UPDATES1.6:1.181	Sun Sep 23 15:17:46 2001
+++ eggdrop1.6/doc/UPDATES1.6	Sun Sep 23 23:25:39 2001
@@ -1,10 +1,13 @@
-$Id: UPDATES1.6,v 1.181 2001/09/23 20:17:46 guppy Exp $
+$Id: UPDATES1.6,v 1.182 2001/09/24 04:25:39 guppy Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.7
 Found by  Fixed by  What...
+          guppy     cleaned up our tcl information on .status (backport from 1.7)
+          guppy     removed dcc-portrange since it was useless (backport from 1.7)
+          drummer   show our probably user at host in cmd_status (backport from 1.7)
 various   stdarg    proper utf8 support
           TaKeDa    small wasop fix
           SuperS    small fix for SunOS
Index: eggdrop1.6/doc/html/egg-core.html
diff -u eggdrop1.6/doc/html/egg-core.html:1.7 eggdrop1.6/doc/html/egg-core.html:1.8
--- eggdrop1.6/doc/html/egg-core.html:1.7	Tue Jul 24 09:19:18 2001
+++ eggdrop1.6/doc/html/egg-core.html	Sun Sep 23 23:25:39 2001
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: egg-core.html,v 1.7 2001/07/24 14:19:18 guppy Exp $ -->
+<!-- $Id: egg-core.html,v 1.8 2001/09/24 04:25:39 guppy Exp $ -->
 
 <html>
   <head>
@@ -630,15 +630,6 @@
           <p>If you want all your dcc file transfers bound to a particular portrange,
           either because your behind a firewall, or for other security reasons, set it
           here.</p>
-        </dd>
-
-        <dt><strong><em>set dcc-portrange 1024:65535</em></strong></dt>
-
-        <dd>
-          <p>This setting is so that people can&#39;t send fake ports to your
-          bot when they try to dcc it. irc clients should never use a port
-          below 1024 and well 65535 is the highest port possible. this
-          setting is used for telnet too.</p>
         </dd>
 
         <dt><strong><em>set dupwait-timeout 5</em></strong></dt>
Index: eggdrop1.6/doc/settings/core.settings
diff -u eggdrop1.6/doc/settings/core.settings:1.4 eggdrop1.6/doc/settings/core.settings:1.5
--- eggdrop1.6/doc/settings/core.settings:1.4	Mon Jan 22 17:47:32 2001
+++ eggdrop1.6/doc/settings/core.settings	Sun Sep 23 23:25:39 2001
@@ -389,13 +389,6 @@
     here.
 
 
-set dcc-portrange 1024:65535
-    This setting is so that people can't send fake ports to your bot when
-    they try to dcc it. irc clients should never use a port below 1024 and
-    well 65535 is the highest port possible. this setting is used for telnet
-    too.
-
-
 set dupwait-timeout 5
     If your eggdrop rejects bots that actually have already disconnected from
     another hub, but the disconnect information has not yet spread over the
Index: eggdrop1.6/eggdrop.complete.conf
diff -u eggdrop1.6/eggdrop.complete.conf:1.33 eggdrop1.6/eggdrop.complete.conf:1.34
--- eggdrop1.6/eggdrop.complete.conf:1.33	Sat Jul 14 07:38:55 2001
+++ eggdrop1.6/eggdrop.complete.conf	Sun Sep 23 23:25:38 2001
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- set that to the directory eggdrop is in i.e. "#! /home/lamest/egg/eggdrop"
 #
-# $Id: eggdrop.complete.conf,v 1.33 2001/07/14 12:38:55 poptix Exp $
+# $Id: eggdrop.complete.conf,v 1.34 2001/09/24 04:25:38 guppy Exp $
 #
 # This config file includes all possible options you can
 # use to configure your bot properly.
@@ -348,12 +348,6 @@
 # maximum number of dcc connections you will allow - you can increase this
 # later, but never decrease it, 50 seems to be enough for everybody
 set max-dcc 50
-
-# this setting is so that people can't send fake ports to your bot when
-# they try to dcc it. irc clients should never use a port below 1024 and
-# well 65535 is the highest port possible. this setting is used for telnet
-# too.
-set dcc-portrange 1024:65535
 
 # [0/1] add the 'dccsimul' tcl command (needed by certain scripts like
 # action.fix.tcl)
Index: eggdrop1.6/language/core.english.lang
diff -u eggdrop1.6/language/core.english.lang:1.24 eggdrop1.6/language/core.english.lang:1.25
--- eggdrop1.6/language/core.english.lang:1.24	Wed Apr 18 23:49:54 2001
+++ eggdrop1.6/language/core.english.lang	Sun Sep 23 23:25:39 2001
@@ -1,7 +1,7 @@
 # core.english.lang
 #   core language messages for eggdrop
 #
-# $Id: core.english.lang,v 1.24 2001/04/19 04:49:54 guppy Exp $
+# $Id: core.english.lang,v 1.25 2001/09/24 04:25:39 guppy Exp $
 
 # General stuff
 0x001,Usage
@@ -116,7 +116,7 @@
 0x52c,log dump mode
 0x52d,Online for
 0x52e,cache hit
-0x52f,Using Tcl library:
+0x52f,Tcl library:
 0x530,New users get flags
 0x531,notify
 0x532,Permanent owner(s)
@@ -138,8 +138,6 @@
 0x543,No free sockets available.
 0x544,Tcl version:
 0x545,header version
-0x546,Tcl patchlevel:
-0x547,header patchlevel
 
 # IRC_
 0x600,Banned
Index: eggdrop1.6/language/core.french.lang
diff -u eggdrop1.6/language/core.french.lang:1.19 eggdrop1.6/language/core.french.lang:1.20
--- eggdrop1.6/language/core.french.lang:1.19	Sat Feb 24 14:08:51 2001
+++ eggdrop1.6/language/core.french.lang	Sun Sep 23 23:25:39 2001
@@ -1,7 +1,7 @@
 # core.french.lang
 #   core language messages for eggdrop
 #
-# $Id: core.french.lang,v 1.19 2001/02/24 20:08:51 guppy Exp $
+# $Id: core.french.lang,v 1.20 2001/09/24 04:25:39 guppy Exp $
 
 
 # General stuff
@@ -117,7 +117,7 @@
 0x52c,mode log
 0x52d,En ligne depuis
 0x52e,cache hit
-0x52f,Utilisation de la librairie Tcl:
+0x52f,librairie Tcl:
 0x530,Les nouveaux utilisateurs obtiennent les drapeaux
 0x531,annonce
 0x532,Proprietaire(s) permanent(s)
@@ -139,8 +139,6 @@
 0x543,No free sockets available.
 0x544,Tcl version:
 0x545,header version
-0x546,Tcl patchlevel:
-0x547,header patchlevel
 
 # IRC_
 0x600,Banni
Index: eggdrop1.6/language/core.german.lang
diff -u eggdrop1.6/language/core.german.lang:1.24 eggdrop1.6/language/core.german.lang:1.25
--- eggdrop1.6/language/core.german.lang:1.24	Wed Apr 18 23:49:54 2001
+++ eggdrop1.6/language/core.german.lang	Sun Sep 23 23:25:39 2001
@@ -6,7 +6,7 @@
 # Modified by Michael for 1.3.25.
 # Modified by rtc for 1.4.0
 #
-# $Id: core.german.lang,v 1.24 2001/04/19 04:49:54 guppy Exp $
+# $Id: core.german.lang,v 1.25 2001/09/24 04:25:39 guppy Exp $
 
 # General stuff
 0x001,Gebrauch
@@ -124,7 +124,7 @@
 0x52c,Log-Modus
 0x52d,Online seit
 0x52e,Cache-Trefferrate
-0x52f,Benutze Tcl Bibliothek:
+0x52f,Tcl Bibliothek:
 0x530,Neue Benutzer bekommen folgende Flags
 0x531,Benachrichtigung
 0x532,Permanente Botbesitzer
@@ -145,8 +145,6 @@
 0x543,Keine freien Sockets verfuegbar.
 0x544,Tcl version:
 0x545,header version
-0x546,Tcl patchlevel:
-0x547,header patchlevel
 
 # IRC_
 0x600,gebannt
Index: eggdrop1.6/src/chanprog.c
diff -u eggdrop1.6/src/chanprog.c:1.25 eggdrop1.6/src/chanprog.c:1.26
--- eggdrop1.6/src/chanprog.c:1.25	Sat Jul 14 07:37:08 2001
+++ eggdrop1.6/src/chanprog.c	Sun Sep 23 23:25:39 2001
@@ -7,7 +7,7 @@
  *   telling the current programmed settings
  *   initializing a lot of stuff and loading the tcl scripts
  *
- * $Id: chanprog.c,v 1.25 2001/07/14 12:37:08 poptix Exp $
+ * $Id: chanprog.c,v 1.26 2001/09/24 04:25:39 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -339,21 +339,15 @@
 	  ((interp) && (Tcl_Eval(interp, "info library") == TCL_OK)) ?
 	  interp->result : "*unknown*");
 
-  /* info tclversion */
+  /* info tclversion/patchlevel */
   dprintf(idx, "%s %s (%s %s)\n", MISC_TCLVERSION,
-	  ((interp) && (Tcl_Eval(interp, "info tclversion") == TCL_OK)) ?
-	  interp->result : "*unknown*", MISC_TCLHVERSION, TCL_VERSION);
-
-  /* info patchlevel */
-  dprintf(idx, "%s %s (%s %s)\n", MISC_TCLPATCHLEVEL,
 	  ((interp) && (Tcl_Eval(interp, "info patchlevel") == TCL_OK)) ?
-	  interp->result : "*unknown*", MISC_TCLHPATCHLEVEL,
+	  interp->result : (Tcl_Eval(interp, "info tclversion") == TCL_OK) ?
+	  interp->result : "*unknown*", MISC_TCLHVERSION,
 	  TCL_PATCH_LEVEL ? TCL_PATCH_LEVEL : "*unknown*");
 
 #if HAVE_TCL_THREADS
-  dprintf(idx, "TCL is threaded\n");
-#else
-  dprintf(idx, "TCL isn't threaded\n");
+  dprintf(idx, "Tcl is threaded\n");
 #endif  
 	  
 }
Index: eggdrop1.6/src/dcc.c
diff -u eggdrop1.6/src/dcc.c:1.47 eggdrop1.6/src/dcc.c:1.48
--- eggdrop1.6/src/dcc.c:1.47	Sat Jun 30 01:29:55 2001
+++ eggdrop1.6/src/dcc.c	Sun Sep 23 23:25:39 2001
@@ -4,7 +4,7 @@
  *   disconnect on a dcc socket
  *   ...and that's it!  (but it's a LOT)
  *
- * $Id: dcc.c,v 1.47 2001/06/30 06:29:55 guppy Exp $
+ * $Id: dcc.c,v 1.48 2001/09/24 04:25:39 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -40,8 +40,7 @@
 extern time_t		 now;
 extern int		 egg_numver, connect_timeout, conmask, backgrd,
 			 max_dcc, make_userfile, default_flags, debug_output,
-			 ignore_time, min_dcc_port, max_dcc_port,
-			 par_telnet_flood;
+			 ignore_time, par_telnet_flood;
 extern char		 botnetnick[], ver[], origbotname[], notify_new[];
 
 
@@ -1108,9 +1107,14 @@
 
   /* <bindle> [09:37] Telnet connection: 168.246.255.191/0
    * <bindle> [09:37] Lost connection while identing [168.246.255.191/0]
+   *
+   * These are hardcoded now (perhaps move to a #define when we clean up
+   * more) since in over a year since this setting was added, I've never
+   * seen anyone who actually knew what this setting did it change it for
+   * the better (including myself) -- guppy (13Aug2001) 
+   *
    */
-  /* Use dcc-portrange x:x on incoming telnets too, dw */
-  if ((port < min_dcc_port) || (port > max_dcc_port)) {
+  if (port < 1024 || port > 65535) {
     putlog(LOG_BOTS, "*", DCC_BADSRC, s, port);
     killsock(sock);
     return;
Index: eggdrop1.6/src/lang.h
diff -u eggdrop1.6/src/lang.h:1.22 eggdrop1.6/src/lang.h:1.23
--- eggdrop1.6/src/lang.h:1.22	Wed Apr 11 21:39:43 2001
+++ eggdrop1.6/src/lang.h	Sun Sep 23 23:25:39 2001
@@ -2,7 +2,7 @@
  * lang.h
  *   Conversion definitions for language support
  *
- * $Id: lang.h,v 1.22 2001/04/12 02:39:43 guppy Exp $
+ * $Id: lang.h,v 1.23 2001/09/24 04:25:39 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -127,8 +127,6 @@
 #define MISC_NOFREESOCK		get_language(0x543)
 #define MISC_TCLVERSION		get_language(0x544)
 #define MISC_TCLHVERSION	get_language(0x545)
-#define MISC_TCLPATCHLEVEL	get_language(0x546)
-#define MISC_TCLHPATCHLEVEL	get_language(0x547)
 
 /* IRC */
 #define IRC_BANNED		get_language(0x600)
Index: eggdrop1.6/src/main.c
diff -u eggdrop1.6/src/main.c:1.70 eggdrop1.6/src/main.c:1.71
--- eggdrop1.6/src/main.c:1.70	Sun Jul 29 01:08:04 2001
+++ eggdrop1.6/src/main.c	Sun Sep 23 23:25:39 2001
@@ -5,7 +5,7 @@
  *   command line arguments
  *   context and assert debugging
  *
- * $Id: main.c,v 1.70 2001/07/29 06:08:04 guppy Exp $
+ * $Id: main.c,v 1.71 2001/09/24 04:25:39 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -265,21 +265,15 @@
 	    ((interp) && (Tcl_Eval(interp, "info library") == TCL_OK)) ?
 	    interp->result : "*unknown*");
 
-    /* info tclversion */
+    /* info tclversion/patchlevel */
     dprintf(-x, "TCL version: %s (header version %s)\n",
-	    ((interp) && (Tcl_Eval(interp, "info tclversion") == TCL_OK)) ?
-	    interp->result : "*unknown*", TCL_VERSION);
-
-    /* info patchlevel */
-    dprintf(-x, "TCL patchlevel: %s (header patchlevel %s)\n",
 	    ((interp) && (Tcl_Eval(interp, "info patchlevel") == TCL_OK)) ?
-	    interp->result : "*unknown*",
-	    TCL_PATCH_LEVEL ? TCL_PATCH_LEVEL : "*unknown*");
+     interp->result : (Tcl_Eval(interp, "info tclversion") == TCL_OK) ?
+     interp->result : "*unknown*", TCL_PATCH_LEVEL ? TCL_PATCH_LEVEL :
+     "*unknown*");
 
 #if HAVE_TCL_THREADS
     dprintf(-x, "TCL is threaded\n");
-#else
-    dprintf(-x, "TCL isn't threaded\n");
 #endif
 
 #ifdef CCFLAGS
Index: eggdrop1.6/src/mod/filesys.mod/filesys.c
diff -u eggdrop1.6/src/mod/filesys.mod/filesys.c:1.43 eggdrop1.6/src/mod/filesys.mod/filesys.c:1.44
--- eggdrop1.6/src/mod/filesys.mod/filesys.c:1.43	Tue Jul 17 14:53:41 2001
+++ eggdrop1.6/src/mod/filesys.mod/filesys.c	Sun Sep 23 23:25:40 2001
@@ -2,7 +2,7 @@
  * filesys.c -- part of filesys.mod
  *   main file of the filesys eggdrop module
  *
- * $Id: filesys.c,v 1.43 2001/07/17 19:53:41 guppy Exp $
+ * $Id: filesys.c,v 1.44 2001/09/24 04:25:40 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -646,8 +646,8 @@
   } else {
     ip = newsplit(&msg);
     prt = newsplit(&msg);
-    if ((atoi(prt) < min_dcc_port) || (atoi(prt) > max_dcc_port)) {
-      /* Invalid port range. */
+    if (atoi(prt) < 1024 || atoi(prt) > 65535) {
+      /* Invalid port */
       dprintf(DP_HELP, "NOTICE %s :%s (invalid port)\n", nick,
 	      DCC_CONNECTFAILED1);
       putlog(LOG_FILES, "*", "Refused dcc send %s (%s): invalid port", param,
@@ -856,8 +856,8 @@
 	     nick, from);
       putlog(LOG_MISC, "*", "    (%s)", buf);
       killsock(sock);
-    } else if ((atoi(prt) < min_dcc_port) || (atoi(prt) > max_dcc_port)) {
-      /* Invalid port range. */
+    } else if (atoi(prt) < 1024 || atoi(prt) > 65535) {
+      /* Invalid port */
       if (!quiet_reject)
         dprintf(DP_HELP, "NOTICE %s :%s (invalid port)\n", nick,
 	        DCC_CONNECTFAILED1);
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.52 eggdrop1.6/src/mod/module.h:1.53
--- eggdrop1.6/src/mod/module.h:1.52	Sun Sep 23 15:17:47 2001
+++ eggdrop1.6/src/mod/module.h	Sun Sep 23 23:25:40 2001
@@ -1,7 +1,7 @@
 /*
  * module.h
  *
- * $Id: module.h,v 1.52 2001/09/23 20:17:47 guppy Exp $
+ * $Id: module.h,v 1.53 2001/09/24 04:25:40 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -363,8 +363,8 @@
 #define sanitycheck_dcc ((int (*)(char *, char *, char *, char *))global[214])
 #define isowner ((int (*)(char *))global[215])
 /* 216 - 219 */
-#define min_dcc_port (*(int *)(global[216]))	/* dcc-portrange dw/guppy */
-#define max_dcc_port (*(int *)(global[217]))
+/* 216: min_dcc_port -- UNUSED (guppy) */
+/* 217: max_dcc_port -- UNUSED (guppy) */
 #define rfc_casecmp ((int(*)(char *, char *))(*(Function**)(global[218])))
 #define rfc_ncasecmp ((int(*)(char *, char *, int *))(*(Function**)(global[219])))
 /* 220 - 223 */
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.71 eggdrop1.6/src/mod/server.mod/server.c:1.72
--- eggdrop1.6/src/mod/server.mod/server.c:1.71	Tue Aug  7 08:42:13 2001
+++ eggdrop1.6/src/mod/server.mod/server.c	Sun Sep 23 23:25:40 2001
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.71 2001/08/07 13:42:13 poptix Exp $
+ * $Id: server.c,v 1.72 2001/09/24 04:25:40 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -27,7 +27,6 @@
 #define MAKING_SERVER
 #include "src/mod/module.h"
 #include "server.h"
-#include <netdb.h>
 
 static Function *global = NULL;
 
@@ -78,7 +77,6 @@
 static int trigger_on_ignore;	/* trigger bindings if user is ignored ? */
 static int answer_ctcp;		/* answer how many stacked ctcp's ? */
 static int lowercase_ctcp;	/* answer lowercase CTCP's (non-standard) */
-static char bothost[81];	/* dont mind me, Im stupid */
 static int check_mode_r;	/* check for IRCNET +r modes */
 static int net_type;
 static char connectserver[121];	/* what, if anything, to do before connect
@@ -1202,7 +1200,8 @@
 {
   char s[1024];
 
-  simple_sprintf(s, "%s!%s", botname, botuserhost);
+  simple_sprintf(s, "%s%s%s", botname, 
+		 botuserhost[0] ? "!" : "", botuserhost[0] ? botuserhost : "");
   Tcl_SetVar2(interp, name1, name2, s, TCL_GLOBAL_ONLY);
   if (flags & TCL_TRACE_UNSETS)
     Tcl_TraceVar(irp, name1, TCL_TRACE_READS | TCL_TRACE_WRITES |
@@ -1431,8 +1430,8 @@
     if (!quiet_reject)
       dprintf(DP_HELP, "NOTICE %s :%s\n", nick, DCC_REFUSED3);
     putlog(LOG_MISC, "*", "%s: %s!%s", DCC_REFUSED4, nick, from);
-  } else if ((atoi(prt) < min_dcc_port) || (atoi(prt) > max_dcc_port)) {
-    /* Invalid port range. */
+  } else if (atoi(prt) < 1024 || atoi(prt) > 65535) {
+    /* Invalid port */
     if (!quiet_reject)
       dprintf(DP_HELP, "NOTICE %s :%s (invalid port)\n", nick,
 	      DCC_CONNECTFAILED1);
@@ -1575,27 +1574,29 @@
  */
 static void server_report(int idx, int details)
 {
-  char s1[128], s[128];
+  char s1[64], s[128];
+  int servidx;
 
-  if (nick_juped)
-    dprintf(idx, "    NICK IS JUPED: %s %s\n", origbotname,
-            keepnick ? "(trying)" : "");
-  dprintf(idx, "    Online as: %s!%s (%s)\n", botname, botuserhost,
-	  botrealname);
-  if (!trying_server) {
+  if (server_online) {
+    dprintf(idx, "    Online as: %s%s%s (%s)\n", botname,
+	    botuserhost[0] ? "!" : "", botuserhost[0] ? botuserhost : "",
+	    botrealname);
+    if (nick_juped)
+      dprintf(idx, "    NICK IS JUPED: %s %s\n", origbotname,
+	      keepnick ? "(trying)" : "");
+    nick_juped = 0; /* WHY?? -- drummer */
     daysdur(now, server_online, s1);
     egg_snprintf(s, sizeof s, "(connected %s)", s1);
-    if ((server_lag) && !(waiting_for_awake)) {
-      egg_snprintf(s1, sizeof s1, " (lag: %ds)", server_lag);
+    if (server_lag && !waiting_for_awake) {
       if (server_lag == (-1))
 	egg_snprintf(s1, sizeof s1, " (bad pong replies)");
+      else
+	egg_snprintf(s1, sizeof s1, " (lag: %ds)", server_lag);
       strcat(s, s1);
     }
   }
-  if (server_online) {
-    int servidx = findanyidx(serv);
-
-    nick_juped = 0;
+  if ((trying_server || server_online) &&
+	((servidx = findanyidx(serv)) != (-1))) {
     dprintf(idx, "    Server %s:%d %s\n", dcc[servidx].host, dcc[servidx].port,
 	    trying_server ? "(trying)" : s);
   } else
@@ -1667,32 +1668,6 @@
   return tot;
 }
 
-/* Put the full hostname in s.
- */
-static void getmyhostname(char *s)
-{
-  struct hostent	*hp;
-  char			*p;
-
-  if (hostname[0]) {
-    strcpy(s, hostname);
-    return;
-  }
-  p = getenv("HOSTNAME");
-  if (p != NULL) {
-    strncpyz(s, p, 81);
-    if (strchr(s, '.') != NULL)
-      return;
-  }
-  gethostname(s, 80);
-  if (strchr(s, '.') != NULL)
-    return;
-  hp = gethostbyname(s);
-  if (hp == NULL)
-    fatal("Hostname self-lookup failed.", 0);
-  strcpy(s, hp->h_name);
-}
-
 static cmd_t my_ctcps[] =
 {
   {"DCC",	"",	ctcp_DCC_CHAT,		"server:DCC"},
@@ -1849,7 +1824,6 @@
   trigger_on_ignore = 0;
   answer_ctcp = 1;
   lowercase_ctcp = 0;
-  bothost[0] = 0;
   check_mode_r = 0;
   maxqmsg = 300;
   burst = 0;
@@ -1931,9 +1905,6 @@
   double_warned = 0;
   newserver[0] = 0;
   newserverport = 0;
-  getmyhostname(bothost);
-  /* Wishful thinking ... */
-  egg_snprintf(botuserhost, sizeof botuserhost, "%s@%s", botuser, bothost);
   curserv = 999;
   do_nettype();
   return NULL;
Index: eggdrop1.6/src/mod/server.mod/servmsg.c
diff -u eggdrop1.6/src/mod/server.mod/servmsg.c:1.58 eggdrop1.6/src/mod/server.mod/servmsg.c:1.59
--- eggdrop1.6/src/mod/server.mod/servmsg.c:1.58	Mon Aug 27 18:08:29 2001
+++ eggdrop1.6/src/mod/server.mod/servmsg.c	Sun Sep 23 23:25:40 2001
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.58 2001/08/27 23:08:29 poptix Exp $
+ * $Id: servmsg.c,v 1.59 2001/09/24 04:25:40 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -233,6 +233,7 @@
   fixcolon(msg);
   strncpyz(botname, msg, NICKLEN);
   altnick_char = 0;
+  dprintf(DP_SERVER, "WHOIS %s\n", botname); /* get user at host */
   /* Call Tcl init-server */
   if (initserver[0])
     do_tcl("init-server", initserver);
@@ -970,6 +971,7 @@
     killsock(dcc[idx].sock);
   dcc[idx].sock = (-1);
   serv = (-1);
+  botuserhost[0] = 0;
 }
 
 static void eof_server(int idx)
@@ -1109,6 +1111,24 @@
   return 0;
 }
 
+static int got311(char *from, char *msg)
+{
+  char *n1, *n2, *u, *h;
+  
+  n1 = newsplit(&msg);
+  n2 = newsplit(&msg);
+  u = newsplit(&msg);
+  h = newsplit(&msg);
+  
+  if (!n1 || !n2 || !u || !h)
+    return 0;
+    
+  if (match_my_nick(n2))
+    egg_snprintf(botuserhost, sizeof botuserhost, "%s@%s", u, h);
+  
+  return 0;
+}
+
 static cmd_t my_raw_binds[] =
 {
   {"PRIVMSG",	"",	(Function) gotmsg,		NULL},
@@ -1130,6 +1150,7 @@
   {"ERROR",	"",	(Function) goterror,		NULL},
   {"KICK",	"",	(Function) gotkick,		NULL},
   {"318",	"",	(Function) whoispenalty,	NULL},
+  {"311", 	"", 	(Function) got311, 		NULL},
   {NULL,	NULL,	NULL,				NULL}
 };
 
@@ -1189,6 +1210,8 @@
     strcpy(dcc[servidx].nick, "(server)");
     strncpyz(dcc[servidx].host, botserver, UHOSTLEN);
 
+    botuserhost[0] = 0;
+
     nick_juped = 0;
     for (chan = chanset; chan; chan = chan->next)
       chan->status &= ~CHAN_JUPED;
@@ -1257,8 +1280,7 @@
     if (pass[0])
       dprintf(DP_MODE, "PASS %s\n", pass);
     dprintf(DP_MODE, "NICK %s\n", botname);
-    dprintf(DP_MODE, "USER %s %s %s :%s\n",
-	    botuser, bothost, dcc[servidx].host, botrealname);
+    dprintf(DP_MODE, "USER %s . . :%s\n", botuser, botrealname);
     /* Wait for async result now */
   }
 }
Index: eggdrop1.6/src/modules.c
diff -u eggdrop1.6/src/modules.c:1.55 eggdrop1.6/src/modules.c:1.56
--- eggdrop1.6/src/modules.c:1.55	Sun Sep 23 15:17:47 2001
+++ eggdrop1.6/src/modules.c	Sun Sep 23 23:25:39 2001
@@ -4,7 +4,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: modules.c,v 1.55 2001/09/23 20:17:47 guppy Exp $
+ * $Id: modules.c,v 1.56 2001/09/24 04:25:39 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -75,9 +75,8 @@
 			 debug_output, gban_total, make_userfile,
 			 gexempt_total, ginvite_total, default_flags,
 			 require_p, max_dcc, share_greet, password_timeout,
-			 min_dcc_port, max_dcc_port, use_invites, use_exempts,
-			 force_expire, do_restart, protect_readonly,
-			 reserved_port_min, reserved_port_max;
+			 use_invites, use_exempts, force_expire, do_restart,
+			 protect_readonly, reserved_port_min, reserved_port_max;
 extern time_t now, online_since;
 extern struct chanset_t *chanset;
 extern tand_t *tandbot;
@@ -458,8 +457,8 @@
   (Function) sanitycheck_dcc,
   (Function) isowner,
   /* 216 - 219 */
-  (Function) & min_dcc_port,	/* int					*/
-  (Function) & max_dcc_port,	/* int					*/
+  (Function) 0, /* min_dcc_port -- UNUSED! (guppy) */
+  (Function) 0, /* max_dcc_port -- UNUSED! (guppy) */
   (Function) & rfc_casecmp,	/* Function *				*/
   (Function) & rfc_ncasecmp,	/* Function *				*/
   /* 220 - 223 */
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.553 eggdrop1.6/src/patch.h:1.554
--- eggdrop1.6/src/patch.h:1.553	Sun Sep 23 15:17:47 2001
+++ eggdrop1.6/src/patch.h	Sun Sep 23 23:25:39 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.553 2001/09/23 20:17:47 guppy Exp $
+ * $Id: patch.h,v 1.554 2001/09/24 04:25:39 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1001276217");		/* current unixtime */
+patch("1001305511");		/* current unixtime */
 /*
  *
  *
  */
-patch("proper_utf8_support");
+patch("backports");
 /*
  *
  *
Index: eggdrop1.6/src/tcl.c
diff -u eggdrop1.6/src/tcl.c:1.37 eggdrop1.6/src/tcl.c:1.38
--- eggdrop1.6/src/tcl.c:1.37	Sun Sep 23 15:17:47 2001
+++ eggdrop1.6/src/tcl.c	Sun Sep 23 23:25:40 2001
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.37 2001/09/23 20:17:47 guppy Exp $
+ * $Id: tcl.c,v 1.38 2001/09/24 04:25:40 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -76,8 +76,6 @@
 int	    must_be_owner = 1;
 int	    max_dcc = 20;		/* needs at least 4 or 5 just to
 					   get started. 20 should be enough   */
-int	    min_dcc_port = 1024;	/* dcc-portrange, min port - dw/guppy */
-int	    max_dcc_port = 65535;	/* dcc-portrange, max port - dw/guppy */
 int	    quick_logs = 0;		/* quick write logs? (flush them
 					   every min instead of every 5	      */
 int	    par_telnet_flood = 1;       /* trigger telnet flood for +f
@@ -483,7 +481,6 @@
 static tcl_coups def_tcl_coups[] =
 {
   {"telnet-flood",	&flood_telnet_thr,	&flood_telnet_time},
-  {"dcc-portrange",	&min_dcc_port,		&max_dcc_port},	/* dw */
   {"reserved-portrange", &reserved_port_min, &reserved_port_max},
   {NULL,		NULL,			NULL}
 };
Index: eggdrop1.6/text/banner
diff -u eggdrop1.6/text/banner:1.6 eggdrop1.6/text/banner:1.7
--- eggdrop1.6/text/banner:1.6	Wed Apr 11 21:39:48 2001
+++ eggdrop1.6/text/banner	Sun Sep 23 23:25:40 2001
@@ -2,7 +2,7 @@
  | __| __ _  __ _  __| | _ _  ___  _ __
  | _| / _` |/ _` |/ _` || '_|/ _ \| '_ \
  |___|\__, |\__, |\__,_||_|  \___/| .__/
-      |___/ |___/                 |_|     v1.6
+      |___/ |___/                 |_|
 
   Copyright (C) 1997 Robey Pointer
   Copyright (C) 1999, 2000, 2001 Eggheads Development Team
Index: eggdrop1.6/text/motd
diff -u eggdrop1.6/text/motd:1.10 eggdrop1.6/text/motd:1.11
--- eggdrop1.6/text/motd:1.10	Sun Jul  1 02:06:30 2001
+++ eggdrop1.6/text/motd	Sun Sep 23 23:25:40 2001
@@ -4,13 +4,8 @@
    / _/ / _ `// _ `// _  // __// _ \ / _ \
   /___/ \_, / \_, / \_,_//_/   \___// .__/
        /___/ /___/                 /_/
-            ___   ____
-           <  /  / __/
-           / /_ / _ \ 
-          /_/(_)\___/ 
 
-Hey %b%N!%b  My name is %b%B%b and I am running %b%V%b,
-on %b%U%b.
+Hey %b%N!%b  My name is %b%B%b and I am running %b%V%b, on %b%U%b.
 
 Local time is now %b%T%b
 %{+n}
----------------------- End of diff -----------------------



More information about the Changes mailing list