Browse Source

Allow wait_split to be configured.

Fixes #60
Bryan Drewery 10 years ago
parent
commit
04ec8d2598
5 changed files with 6 additions and 4 deletions
  1. 2 1
      doc/UPDATES.md
  2. 1 0
      doc/help.txt
  3. 0 2
      src/mod/irc.mod/irc.cc
  4. 2 0
      src/set.cc
  5. 1 1
      src/set.h

+ 2 - 1
doc/UPDATES.md

@@ -16,7 +16,8 @@
   * Fix various small memory leaks.
   * Fix case where .[bot]set would not share to new bots until their localhub
     was relinked.
-  * Raise netsplit timeout to 1000 seconds.
+  * Raise netsplit timeout to 1000 seconds and allow it to be configured with
+    'set wait-split' (#60).
   * Indent BOTNET entries some in .whois.
   * Disallow negative 'chanset limit' (#96).
   * Raise server cycle time from 15 to 30 seconds and add

+ 1 - 0
doc/help.txt

@@ -1664,6 +1664,7 @@ See also: reload, backup
 [N]  $bserver-port$b         Default port to use for server connections.
 [N]  $bserver-port-ssl$b     Default port to use for SSL server connections.
 [B]  $bserver-use-ssl$b      Use SSL for IRC server connections?
+[N]  $bwait-split$b          How long in seconds to track netsplit members.
  
  
 [B]  $bauth-chan$b           If set, auth cmds will work in channels as well as in msg, otherwise 

+ 0 - 2
src/mod/irc.mod/irc.cc

@@ -74,8 +74,6 @@ static cache_t *irccache = NULL;
 
 #define do_eI (((now - chan->channel.last_eI) > 30) ? 1 : 0)
 
-static time_t wait_split = 1000;    /* Time to wait for user to return from
-                                 * net-split. */
 int max_bans;                   /* Modified by net-type 1-4 */
 int max_exempts;
 int max_invites;

+ 2 - 0
src/set.cc

@@ -76,6 +76,7 @@ char usermode[15] = "";
 bool fish_auto_keyx = 0;
 bool fish_paranoid = 0;
 int server_cycle_wait;
+int wait_split;
 
 ////// THIS MUST REMAIN SORTED: !LC_ALL=C sort
 // VAR("bad-process",	&badprocess,		VAR_INT|VAR_DETECTED,				0, 4, "ignore"),
@@ -137,6 +138,7 @@ static variable_t vars[] = {
  VAR("servers6-ssl",	&serverlist,		VAR_SERVERS|VAR_LIST|VAR_SHUFFLE|VAR_NOLHUB|VAR_NOLDEF,	0, 0, DEFAULT_SERVERS6_SSL),
  VAR("trace",		&trace,			VAR_INT|VAR_DETECTED,				0, 4, "die"),
  VAR("usermode",	&usermode,		VAR_WORD|VAR_NOLHUB,				0, 0, "+iws"),
+ VAR("wait-split",	&wait_split,		VAR_INT|VAR_NOLHUB,				0, 86400, "1000"),
  VAR(NULL,		NULL,			0,						0, 0, NULL)
 };
 

+ 1 - 1
src/set.h

@@ -73,7 +73,7 @@ extern char		auth_key[], auth_prefix[2], motd[], alias[], rbl_servers[1024], gro
 extern bool		dccauth, auth_obscure, manop_warn, auth_chan, oidentd, ident_botnick, irc_autoaway, link_cleartext, use_deaf, use_callerid, fish_auto_keyx, fish_paranoid;
 extern int		cloak_script, fight_threshold, in_bots, set_noshare, dcc_autoaway,
 			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,
-                        ison_time, msgrate, msgburst, server_cycle_wait;
+                        ison_time, msgrate, msgburst, server_cycle_wait, wait_split;
 extern rate_t		op_requests, close_threshold;
 
 namespace bd {