mIRC Homepage
Posted By: Enemy mIRC Spam Bot - 15/03/07 06:22 PM
Hi peopels.
I have one channel with a "Counter-Strike Warserver let bot"
The problem is. Some idiots, spam with commands !book etc.
So, the bot goes pingout, and the bot dissconnected, how i can repair this problem?.
Help me i have very big problem with this idiots.
Posted By: Kardafol Re: mIRC Spam Bot - 15/03/07 06:32 PM
Press ALT + R two times, look for something along the lines of:
Code:
on TEXT {

Add
Code:
if (%flood.timer) return
inc -u2 %flood.timer

Right after it, so you have the original code with the 'on text', a new line, then the 'if (%flood.timer)...', and the rest of the code after that.
It should look something like
Code:
on *:text:*:#: {
if (%flood.timer) return
inc -u2 %flood.timer
...
}

NOTE: Do not replace the code with the above, just add a new line and paste
Code:
if (%flood.timer) return
inc -u2 %flood.timer

after it, this will limit it to one command every two seconds. You can change this by changing the '-u2' to '-u5', for once per 5 seconds, etc.
Posted By: Enemy Re: mIRC Spam Bot - 15/03/07 06:38 PM
I see
on *:text:!boka:%chan:{
if (%boka == 4off) {
msg # Bokningen är avstängd
halt | return
Is that realy?
Posted By: Kardafol Re: mIRC Spam Bot - 15/03/07 06:45 PM
Yes, thats where you should add the code.
Code:
on *:text:!boka:%chan:{
 if (%flood.timer) return
 inc -u2 %flood.timer
 if (%boka == 4off) {
  msg # Bokningen är avstängd
  halt
Posted By: Enemy Re: mIRC Spam Bot - 15/03/07 07:26 PM
i put so. but i spammed !boka , and the bot (Excess Flood)
its dont work:S
Posted By: ik000ike Re: mIRC Spam Bot - 15/03/07 07:29 PM
are all brackets closed in your code ?
Posted By: Enemy Re: mIRC Spam Bot - 15/03/07 07:30 PM
What you mean?:S
Posted By: Kardafol Re: mIRC Spam Bot - 15/03/07 08:18 PM
Post all the code you're using, and we can modify it for you.
Posted By: DJ_Sol Re: mIRC Spam Bot - 16/03/07 01:42 AM
What I also like to do is set the variable only after the script is triggered.

Quote:
on *:text:*:#:{
if (%var [ $+ [ $nick ] ]) return
set -u2 %var [ $+ [ $nick ] ]
if ($1 == hi) msg $chan hi
}


This here will set a variable on every single nickname that says anything. The point of the flood protect is to stop people from making my script respond too many times. If mny script doesn't respond I don't need to set the variable. This also will be less timed variables counting down.

Quote:
on *:text:*:#:{
if (%var [ $+ [ $nick ] ]) return
if ($1 == hi) { msg $chan hi | set -u2 %var [ $+ [ $nick ] ] }
}
Now it will only set the variable if they make my script respond.

But what if I have many text responses in this text event? I haven't put this into practice, but this is the idea I had.

Quote:
on *:text:*:#:{
if (%var [ $+ [ $nick ] ]) return
if ($1 == hi) { msg $chan hi | goto var }
if ($1 == bye) { msg $chan Bye $nick $+ ! | goto var }
:var set -u2 %var [ $+ [ $nick ] ]
}


Just means less code is all.
Posted By: Kardafol Re: mIRC Spam Bot - 16/03/07 01:00 PM
No need to make the code more complicated.
Also this won't stop multiple people from flooding a bot.
Posted By: Riamus2 Re: mIRC Spam Bot - 16/03/07 01:12 PM
It is also advisable, as mentioned previously, to avoid GOTO... especially in a simple IF/ELSEIF situation.
© mIRC Discussion Forums