This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

A bot's flood protection

General support and discussion of Eggdrop bots.
Post Reply
b
blinky
Voice
Posts: 10
Joined: Wed Apr 26, 2006 7:03 pm

A bot's flood protection

Post by blinky »

Is there a way to allow the bot to send messages as fast as possible. I have the bot on my network on it's own server that has it's sendq disabled so it won't flood out if it tries to send messages to fast and i want to to be able to notice very fast. Thanks. i hope you understand what im trying to say :)
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

look at the docs for 'putquick'
b
blinky
Voice
Posts: 10
Joined: Wed Apr 26, 2006 7:03 pm

Post by blinky »

i have everything on putquick but it still had a 2 second delay on every line after the first 3
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

other then using the -next option, to get faster message rates you would have to edit the source code (discussed in other topics)
b
blinky
Voice
Posts: 10
Joined: Wed Apr 26, 2006 7:03 pm

Post by blinky »

editing the source shouldnt be a problem. can you hint me some places where it is discussed or what to search. every time i search bot flood or whatever i get the channel flood protections. also i cant find -next, what is that?
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

try searching for 'queue' and 'msgrate'
i have everything on putquick
-next is in the docs
b
blinky
Voice
Posts: 10
Joined: Wed Apr 26, 2006 7:03 pm

Post by blinky »

thanks a lot dragnlord. i found a patch on google but page 2 :[. it worked though. i post it here if anyone wants to use it.

Code: Select all

--- eggdrop-1.6.15/src/mod/server.mod/server.c.old	2004-01-01 22:33:47.112948000 -0500
+++ eggdrop-1.6.15/src/mod/server.mod/server.c	2004-01-01 22:33:57.329394864 -0500
@@ -120,7 +120,7 @@
  * lower this value at your own risk.  ircd is known to start flood control
  * at 512 bytes/2 seconds.
  */
-#define msgrate 2
+#define msgrate 0
 
 /* Maximum messages to store in each queue. */
 static int maxqmsg;
@@ -151,17 +151,17 @@
   int ok = 0;
 
   /* now < last_time tested 'cause clock adjustments could mess it up */
-  if ((now - last_time) >= msgrate || now < (last_time - 90)) {
+  /* if ((now - last_time) >= msgrate || now < (last_time - 90)) { */
     last_time = now;
     if (burst > 0)
       burst--;
     ok = 1;
-  }
+  /* } */
   if (serv < 0)
     return;
   /* Send upto 4 msgs to server if the *critical queue* has anything in it */
   if (modeq.head) {
-    while (modeq.head && (burst < 4) && ((last_time - now) < MAXPENALTY)) {
+    while (modeq.head && (burst < 4)/* && ((last_time - now) < MAXPENALTY) */) {
       if (deq_kick(DP_MODE)) {
         burst++;
         continue;
@@ -924,7 +924,7 @@
     }
   }
 
-  if (which == DP_MODE || which == DP_MODE_NEXT)
+  /* if (which == DP_MODE || which == DP_MODE_NEXT) */
     deq_msg(); /* DP_MODE needs to be sent ASAP, flush if possible. */
 }
 
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

putdccraw can be a solution as well. It sends the command directly to the server without using the eggdrop queue.
Post Reply