From 4b66f0337e8d094258051d723f6cc9a57e24bfba Mon Sep 17 00:00:00 2001 From: deuce <> Date: Wed, 25 Nov 2015 09:05:26 +0000 Subject: [PATCH] Base the throttling on careful(ish) study of the ircd... The first four lines can be sent as fast as you like... after that, there must be at least two seconds (ala time()!) before you send the next or a two-second delay will be inserted for you. Try to hack this, but the inter-line delay appears to need to be three seconds because of the granularity of time(). Maybe the ircd should switch to a better time source... --- exec/ircmsg.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exec/ircmsg.js b/exec/ircmsg.js index 5fe95dbba2..08601a2a19 100644 --- a/exec/ircmsg.js +++ b/exec/ircmsg.js @@ -96,11 +96,11 @@ var delay=0; if(msg) send(msg, delay); else while((msg=readln())!=undefined) { /* read from stdin */ + var send_count = 0; if (send(msg, delay)) { - if(delay < 2000) - delay*=2; - if (delay == 0) - delay = 1000; + send_count++; + if (send_count > 4) + delay = 2050; } } -- GitLab