[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.iavalley.cc.ia.us
Mon Jan 22 17:48:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-01-22 23:47:44 UTC

Modified files:
     eggdrop.complete.conf doc/UPDATES1.6 doc/html/egg-core.html
     doc/settings/core.settings help/core.help help/set/cmds1.help
     help/set/cmds2.help src/dccutil.c src/modules.c src/patch.h
     src/tcl.c src/mod/module.h src/mod/filesys.mod/filesys.c
     src/mod/transfer.mod/transfer.c

Log message:

applied reserved-portrange.diff (yay)

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.50 eggdrop1.6/doc/UPDATES1.6:1.51
--- eggdrop1.6/doc/UPDATES1.6:1.50	Mon Jan 22 17:41:11 2001
+++ eggdrop1.6/doc/UPDATES1.6	Mon Jan 22 17:47:32 2001
@@ -4,6 +4,7 @@
 
 1.6.3
 Found by  Fixed by  What...
+project10 guppy     made the reserved-port setting into reserved-portrange
 various   Tothwolf  added i18n support to fix our problems with tcl
           ppslim    some minor doc fixes
 GregMo    Sup       `.note' wasn't correctly requiring a message parameter.
Index: eggdrop1.6/doc/html/egg-core.html
diff -u eggdrop1.6/doc/html/egg-core.html:1.5 eggdrop1.6/doc/html/egg-core.html:1.6
--- eggdrop1.6/doc/html/egg-core.html:1.5	Sun Nov  5 22:06:41 2000
+++ eggdrop1.6/doc/html/egg-core.html	Mon Jan 22 17:47:32 2001
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: egg-core.html,v 1.5 2000/11/06 04:06:41 guppy Exp $ -->
+<!-- $Id: egg-core.html,v 1.6 2001/01/22 23:47:32 guppy Exp $ -->
 
 <html>
   <head>
@@ -624,14 +624,12 @@
           setting.</p>
         </dd>
 
-        <dt><strong><em>set reserved-port 9076</em></strong></dt>
+        <dt><strong><em>set reserved-portrange 2010:2020</em></strong></dt>
 
         <dd>
-          <p>If you want all your dcc connections bound to one specific port,
-          set it here.</p>
-
-          <p>Note that this setting limits your dcc connections to pretty one
-          at time.</p>
+          <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>
Index: eggdrop1.6/doc/settings/core.settings
diff -u eggdrop1.6/doc/settings/core.settings:1.3 eggdrop1.6/doc/settings/core.settings:1.4
--- eggdrop1.6/doc/settings/core.settings:1.3	Mon Oct  9 07:26:33 2000
+++ eggdrop1.6/doc/settings/core.settings	Mon Jan 22 17:47:32 2001
@@ -383,10 +383,10 @@
     Do not enter anything for my-ip or my-hostname if you use this setting.
 
 
-set reserved-port 9076
-    If you want all your dcc connections bound to one specific port, set
-    it here.
-    Note that this setting limits your dcc connections to pretty one at time.
+set reserved-portrange 2010:2020
+    If you want all dcc file transfers to use a particular portrange either
+    because you're behind a firewall, or for other security reasons, set it
+    here.
 
 
 set dcc-portrange 1024:65535
Index: eggdrop1.6/eggdrop.complete.conf
diff -u eggdrop1.6/eggdrop.complete.conf:1.25 eggdrop1.6/eggdrop.complete.conf:1.26
--- eggdrop1.6/eggdrop.complete.conf:1.25	Tue Nov 28 21:10:23 2000
+++ eggdrop1.6/eggdrop.complete.conf	Mon Jan 22 17:47:32 2001
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- set that to the directory eggdrop is in ie "#! /home/lamest/egg/eggdrop"
 #
-# $Id: eggdrop.complete.conf,v 1.25 2000/11/29 03:10:23 guppy Exp $
+# $Id: eggdrop.complete.conf,v 1.26 2001/01/22 23:47:32 guppy Exp $
 #
 # this config file includes all possible options you can
 # use to configure your bot properly.
@@ -270,11 +270,10 @@
 # Do not enter anything for my-ip or my-hostname.
 #set nat-ip "127.0.0.1"
 
-# if you want all dcc file transfers to use 1 particular listening port
-# (this pretty much limits you to one concurrent file transfer at a time),
-# either because you're behind a firewall, or for other security reasons,
-# set it here
-#set reserved-port 9076
+# if you want all dcc file transfers to use a particular portrange either
+# because you're behind a firewall, or for other security reasons, set it
+# here.
+#set reserved-portrange 2010:2020
 
 # temporary ignores will last how many minutes?
 set ignore-time 15
Index: eggdrop1.6/help/core.help
diff -u eggdrop1.6/help/core.help:1.5 eggdrop1.6/help/core.help:1.6
--- eggdrop1.6/help/core.help:1.5	Sat Dec 23 00:11:34 2000
+++ eggdrop1.6/help/core.help	Mon Jan 22 17:47:33 2001
@@ -151,7 +151,7 @@
 save-users-at
 switch-logfiles-at
 connect-timeout
-reserved-port
+reserved-portrange
 log-time
 require-p
 keep-all-logs
Index: eggdrop1.6/help/set/cmds1.help
diff -u eggdrop1.6/help/set/cmds1.help:1.1 eggdrop1.6/help/set/cmds1.help:1.2
--- eggdrop1.6/help/set/cmds1.help:1.1	Wed Dec 22 16:02:20 1999
+++ eggdrop1.6/help/set/cmds1.help	Mon Jan 22 17:47:33 2001
@@ -144,7 +144,7 @@
    passthru server (this barely works, if at all -- consider using
    socks).
 
-see also: set reserved-port
+see also: set reserved-portrange
 %{help=set telnet-flood}%{+n}
 ###  %bset telnet-flood <times:seconds>%b
    this setting will cause the bot to ignore any futher telnets it
Index: eggdrop1.6/help/set/cmds2.help
diff -u eggdrop1.6/help/set/cmds2.help:1.3 eggdrop1.6/help/set/cmds2.help:1.4
--- eggdrop1.6/help/set/cmds2.help:1.3	Sun Oct  1 14:12:45 2000
+++ eggdrop1.6/help/set/cmds2.help	Mon Jan 22 17:47:33 2001
@@ -39,11 +39,11 @@
    specifies how long to wait when connecting to a dcc chat, telnet,
    relay, bot link, or anything like that.  if the connect doesn't
    happen after this many seconds, the bot will just give up.
-%{help=set reserved-port}%{+n}
-###  %bset reserved-port%b <port#>
-   names a particular port to send all outgoing DCC file transfers
+%{help=set reserved-portrange}%{+n}
+###  %bset reserved-portrange%b <lowport>:<highport>
+   names a particular portrange to send all outgoing DCC file transfers
    through.  if you're behind a firewall, and you can tell your
-   firewall software to make a "peephole" on a certain port, you
+   firewall software to make a "peephole" on certain ports, you
    would need to set this to make sure that all file transfers
    go through the peephole.  (normally, DCC file transfers grab
    the nearest unused port.)  there are also various other security
Index: eggdrop1.6/src/dccutil.c
diff -u eggdrop1.6/src/dccutil.c:1.24 eggdrop1.6/src/dccutil.c:1.25
--- eggdrop1.6/src/dccutil.c:1.24	Sun Dec 10 09:10:27 2000
+++ eggdrop1.6/src/dccutil.c	Mon Jan 22 17:47:33 2001
@@ -6,7 +6,7 @@
  *   memory management for dcc structures
  *   timeout checking for dcc connections
  * 
- * $Id: dccutil.c,v 1.24 2000/12/10 15:10:27 guppy Exp $
+ * $Id: dccutil.c,v 1.25 2001/01/22 23:47:33 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -43,8 +43,9 @@
 char	motdfile[121] = "text/motd";	/* File where the motd is stored */
 int	connect_timeout = 15;		/* How long to wait before a telnet
 					   connection times out */
-int	reserved_port = 0;
 
+int reserved_port_min = 0;
+int reserved_port_max = 0;
 
 void init_dcc_max()
 {
Index: eggdrop1.6/src/mod/filesys.mod/filesys.c
diff -u eggdrop1.6/src/mod/filesys.mod/filesys.c:1.39 eggdrop1.6/src/mod/filesys.mod/filesys.c:1.40
--- eggdrop1.6/src/mod/filesys.mod/filesys.c:1.39	Tue Jan 16 11:13:22 2001
+++ eggdrop1.6/src/mod/filesys.mod/filesys.c	Mon Jan 22 17:47:33 2001
@@ -2,7 +2,7 @@
  * filesys.c -- part of filesys.mod
  *   main file of the filesys eggdrop module
  * 
- * $Id: filesys.c,v 1.39 2001/01/16 17:13:22 guppy Exp $
+ * $Id: filesys.c,v 1.40 2001/01/22 23:47:33 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -369,8 +369,8 @@
     return 0;
   }
   if (x == DCCSEND_NOSOCK) {
-    if (reserved_port) {
-      dprintf(idx, "My DCC SEND port is in use.  Try later.\n");
+    if (reserved_port_min) {
+      dprintf(idx, "All my DCC SEND ports are in use.  Try later.\n");
       putlog(LOG_FILES, "*", "DCC port in use (can't open): %sGET %s [%s]",
 	     resend ? "RE" : "", filename, dcc[idx].nick);
     } else {
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.38 eggdrop1.6/src/mod/module.h:1.39
--- eggdrop1.6/src/mod/module.h:1.38	Sun Dec 17 15:48:42 2000
+++ eggdrop1.6/src/mod/module.h	Mon Jan 22 17:47:33 2001
@@ -1,7 +1,7 @@
 /* 
  * module.h
  * 
- * $Id: module.h,v 1.38 2000/12/17 21:48:42 guppy Exp $
+ * $Id: module.h,v 1.39 2001/01/22 23:47:33 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -214,11 +214,11 @@
 /* 100 - 103 */
 #define max_dcc (*(int *)global[100])
 #define require_p (*(int *)global[101])
-/* this was use_silence */
+#define ignore_time (*(int *)(global[102]))
 #define use_console_r (*(int *)(global[103]))
 /* 104 - 107 */
-#define ignore_time (*(int *)(global[104]))
-#define reserved_port (*(int *)(global[105]))
+#define reserved_port_min (*(int *)(global[104]))
+#define reserved_port_max (*(int *)(global[105]))
 #define debug_output (*(int *)(global[106]))
 #define noshare (*(int *)(global[107]))
 /* 108 - 111 */
Index: eggdrop1.6/src/mod/transfer.mod/transfer.c
diff -u eggdrop1.6/src/mod/transfer.mod/transfer.c:1.34 eggdrop1.6/src/mod/transfer.mod/transfer.c:1.35
--- eggdrop1.6/src/mod/transfer.mod/transfer.c:1.34	Tue Jan 16 11:13:24 2001
+++ eggdrop1.6/src/mod/transfer.mod/transfer.c	Mon Jan 22 17:47:34 2001
@@ -1,7 +1,7 @@
 /* 
  * transfer.c -- part of transfer.mod
  * 
- * $Id: transfer.c,v 1.34 2001/01/16 17:13:24 guppy Exp $
+ * $Id: transfer.c,v 1.35 2001/01/22 23:47:34 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -1444,12 +1444,21 @@
   struct stat ss;
   FILE *f;
 
+  zz = (-1);
   stat(filename, &ss);
   /* File empty?! */
   if (ss.st_size == 0)
     return DCCSEND_FEMPTY;
-  port = reserved_port;
+  if (reserved_port_min > 0 && reserved_port_min < reserved_port_max) {
+    for (port = reserved_port_min; port <= reserved_port_max; port++) {
   zz = open_listen(&port);
+     if (zz != (-1))
+       break;
+    }
+  } else {
+    port = reserved_port_min;
+    zz = open_listen(&port);
+  }
   if (zz == (-1))
     return DCCSEND_NOSOCK;
   nfn = strrchr(dir, '/');
Index: eggdrop1.6/src/modules.c
diff -u eggdrop1.6/src/modules.c:1.43 eggdrop1.6/src/modules.c:1.44
--- eggdrop1.6/src/modules.c:1.43	Sun Dec 10 09:10:27 2000
+++ eggdrop1.6/src/modules.c	Mon Jan 22 17:47:33 2001
@@ -4,7 +4,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: modules.c,v 1.43 2000/12/10 15:10:27 guppy Exp $
+ * $Id: modules.c,v 1.44 2001/01/22 23:47:33 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -70,14 +70,14 @@
 			 hostname[], origbotname[], botuser[], admin[],
 			 userfile[], ver[], notify_new[], helpdir[],
 			 version[];
-extern int		 reserved_port, noshare, dcc_total, egg_numver,
+extern int	 noshare, dcc_total, egg_numver, userfile_perm,
 			 use_console_r, ignore_time, must_be_owner,
 			 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,
-			 userfile_perm;
+			 reserved_port_min, reserved_port_max;
 extern time_t now, online_since;
 extern struct chanset_t *chanset;
 extern tand_t *tandbot;
@@ -312,11 +312,11 @@
   /* 100 - 103 */
   (Function) & max_dcc,		 /* int					*/
   (Function) & require_p,	 /* int					*/
-  (Function) 0,                  /* this was use_silence		*/
+  (Function) & ignore_time,	 /* int					*/
   (Function) & use_console_r,	 /* int					*/
   /* 104 - 107 */
-  (Function) & ignore_time,	 /* int					*/
-  (Function) & reserved_port,	 /* int					*/
+  (Function) & reserved_port_min,
+  (Function) & reserved_port_max,
   (Function) & debug_output,	 /* int					*/
   (Function) & noshare,		 /* int					*/
   /* 108 - 111 */
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.417 eggdrop1.6/src/patch.h:1.418
--- eggdrop1.6/src/patch.h:1.417	Mon Jan 22 17:41:11 2001
+++ eggdrop1.6/src/patch.h	Mon Jan 22 17:47:33 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  * 
- * $Id: patch.h,v 1.417 2001/01/22 23:41:11 guppy Exp $
+ * $Id: patch.h,v 1.418 2001/01/22 23:47:33 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("980206584");		/* current unixtime */
+patch("980207019");		/* current unixtime */
 /*
  *
  *
  */
-patch("i18n-support");
+patch("reserved-portrange");
 /*
  *
  *
Index: eggdrop1.6/src/tcl.c
diff -u eggdrop1.6/src/tcl.c:1.27 eggdrop1.6/src/tcl.c:1.28
--- eggdrop1.6/src/tcl.c:1.27	Mon Jan 22 17:41:11 2001
+++ eggdrop1.6/src/tcl.c	Mon Jan 22 17:47:33 2001
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  * 
- * $Id: tcl.c,v 1.27 2001/01/22 23:41:11 guppy Exp $
+ * $Id: tcl.c,v 1.28 2001/01/22 23:47:33 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -47,8 +47,8 @@
 extern int	shtime, share_greet, require_p, keep_all_logs;
 extern int	allow_new_telnets, stealth_telnets, use_telnet_banner;
 extern int	default_flags, conmask, switch_logfiles_at, connect_timeout;
-extern int	firewallport, reserved_port, notify_users_at;
-extern int	flood_thr, ignore_time;
+extern int	firewallport, notify_users_at, flood_thr, ignore_time;
+extern int	reserved_port_min, reserved_port_max;
 extern char	origbotname[], botuser[], motdfile[], admin[], userfile[],
 		firewall[], helpdir[], notify_new[], hostname[], myip[],
 		moddir[], tempdir[], owner[], network[], botnetnick[],
@@ -419,7 +419,7 @@
   {"hourly-updates",		&notify_users_at,	0},
   {"switch-logfiles-at",	&switch_logfiles_at,	0},
   {"connect-timeout",		&connect_timeout,	0},
-  {"reserved-port",		&reserved_port,		0},
+  {"reserved-port",		&reserved_port_min,		0},
   /* booleans (really just ints) */
   {"require-p",			&require_p,		0},
   {"keep-all-logs",		&keep_all_logs,		0},
@@ -465,6 +465,7 @@
 {
   {"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}
 };
 
----------------------- End of diff -----------------------



More information about the Changes mailing list