Sfoglia il codice sorgente

* Add set 'msgrate' to define how often to dequeue to the server. (1 or 2 is good)

Bryan Drewery 16 anni fa
parent
commit
3b4b14badd
5 ha cambiato i file con 9 aggiunte e 7 eliminazioni
  1. 1 0
      doc/UPDATES
  2. 1 0
      doc/help.txt
  3. 0 6
      src/mod/server.mod/server.c
  4. 6 0
      src/set.c
  5. 1 1
      src/set.h

+ 1 - 0
doc/UPDATES

@@ -1,4 +1,5 @@
 * Speedup irc server queue by bursting more often and fully. Thanks VXP.
+* Add set 'msgrate' to define how often to dequeue to the server. (1 or 2 is good)
 
 1.2.17 - http://wraith.botpack.net/milestone/1.2.17
 * Binary / shell / startup changes

+ 1 - 0
doc/help.txt

@@ -1595,6 +1595,7 @@ See also: reload, backup
  
 [L]  $bservers$b         Comma-separated list of servers the bot will use.
 [L]  $bservers6$b        Comma-separated list of servers the bot will use (FOR IPv6).
+[N]  $bmsgrate$b         How often (seconds) to dequeue msgs to the server. (1 or 2 is good)
 
 [L]  $brbl-servers$b     Servers to use for RBL checking in channels that are +rbl.
  

+ 0 - 6
src/mod/server.mod/server.c

@@ -118,12 +118,6 @@ bind_table_t *BT_ctcr = NULL, *BT_ctcp = NULL, *BT_msgc = NULL;
 
 #define MAXPENALTY 10
 
-/* Number of seconds to wait between transmitting queued lines to the server
- * lower this value at your own risk.  ircd is known to start flood control
- * at 512 bytes/2 seconds.
- */
-#define msgrate 2
-
 /* Maximum messages to store in each queue. */
 static int maxqmsg = 300;
 static struct msgq_head mq, hq, modeq, cacheq;

+ 6 - 0
src/set.c

@@ -51,6 +51,11 @@ int ison_time = 10;
 int kill_threshold;
 int lag_threshold;
 int login;
+/* Number of seconds to wait between transmitting queued lines to the server
+ * lower this value at your own risk.  ircd is known to start flood control
+ * at 512 bytes/2 seconds.
+ */
+int msgrate = 1;
 char motd[512] = "";
 char msgident[21] = "";
 char msginvite[21] = "";
@@ -99,6 +104,7 @@ static variable_t vars[] = {
  VAR("msg-invite",	msginvite,		VAR_WORD|VAR_NOLHUB,				0, 0, NULL),
  VAR("msg-op",		msgop,			VAR_WORD|VAR_NOLHUB,				0, 0, NULL),
  VAR("msg-pass",	msgpass,		VAR_WORD|VAR_NOLHUB,				0, 0, NULL),
+ VAR("msgrate",		&msgrate,		VAR_INT|VAR_NOLHUB,				0, 90, "1"),
  VAR("nick",		origbotname,		VAR_WORD|VAR_NOHUB|VAR_NICK|VAR_NODEF,	0, 0, NULL),
  VAR("notify-time",	&ison_time,		VAR_INT|VAR_NOLHUB,				1, 30, "10"),
  VAR("oidentd",		&oidentd,		VAR_INT|VAR_BOOL|VAR_NOLHUB,			0, 1, "0"),

+ 1 - 1
src/set.h

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