egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A bot's flood protection

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
blinky
Voice


Joined: 26 Apr 2006
Posts: 10

PostPosted: Wed Apr 26, 2006 7:08 pm    Post subject: A bot's flood protection Reply with quote

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 Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 26, 2006 7:10 pm    Post subject: Reply with quote

look at the docs for 'putquick'
Back to top
View user's profile Send private message
blinky
Voice


Joined: 26 Apr 2006
Posts: 10

PostPosted: Wed Apr 26, 2006 7:13 pm    Post subject: Reply with quote

i have everything on putquick but it still had a 2 second delay on every line after the first 3
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 26, 2006 7:30 pm    Post subject: Reply with quote

other then using the -next option, to get faster message rates you would have to edit the source code (discussed in other topics)
Back to top
View user's profile Send private message
blinky
Voice


Joined: 26 Apr 2006
Posts: 10

PostPosted: Wed Apr 26, 2006 7:46 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 26, 2006 8:07 pm    Post subject: Reply with quote

try searching for 'queue' and 'msgrate'

Quote:
i have everything on putquick

-next is in the docs
Back to top
View user's profile Send private message
blinky
Voice


Joined: 26 Apr 2006
Posts: 10

PostPosted: Sun Apr 30, 2006 3:58 am    Post subject: Reply with quote

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:

--- 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. */
 }
 
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Apr 30, 2006 8:32 am    Post subject: Reply with quote

putdccraw can be a solution as well. It sends the command directly to the server without using the eggdrop queue.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber