mIRC Homepage
Posted By: MonkeyMan1988 script to stop Bot Spam - 27/11/08 08:02 AM
I have a fun bot for my irc room, he is mainly for function but i have a few commands for fun,
Things like when people say they are tired, he says "then go to sleep ya pansy" and things like that

but sometimes dumb bungholes decide to spam the bot, triggering every command, and its basically annoying for everyone in the room.

is there any way to make a command that auto bans anyone who triggers the bot the bot 5 times in 2 minutes

The channel is #monkeyman1988

(please try to make it a reletively simple command (or tell me what each piece of the command does) almost every time i try to get command help here its always an overtly complicated command (but i usually figure it out by picking it appart and making it my own anyway)
Posted By: Thrull Re: script to stop Bot Spam - 27/11/08 11:17 AM
Yes, but without knowing the triggers I can't be a lot of help.

The basic code is to keep track of who triggers the bot, set a variable and keep track of it for 5 minutes or so.

A better alternative might be to just stop the bot from trigering more than once every 15 seconds or so. To do this, every time its triggered set a variable to $true and unset it in 15 seconds. As long as the variable is $true, stop the bot from doing anything.
Posted By: sparta Re: script to stop Bot Spam - 27/11/08 12:59 PM
Code:
on *:text:*:#: {
  if (!%spam) {
  echo -a rest of your code here
 ;set is the last line.
 set -u10 %spam .
}

this will set a variable that will last for 10 seconds, if the %spam variable exist the script will halt. change the 10 in the set -u10 %spam line to what you want, set -u2 %spam will unset the variable after 2 seconds. no one can flood your bot offline, and you can play with user levels, then give a user a level, and that level can't trigger the bot, many ways to solve this one smile
Posted By: DJ_Sol Re: script to stop Bot Spam - 27/11/08 03:10 PM
https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=206405&page=3#Post206405


Search for text flood and you will find this thread.
Posted By: MonkeyMan1988 Re: script to stop Bot Spam - 27/11/08 03:44 PM
The site it is on, has a floodcheck already on it sort of, just doesnt let you say the same thing twice in 30 seconds... but of course they just alternate the commands back and forth, and it gets annoying
Posted By: _Memo Re: script to stop Bot Spam - 27/11/08 04:08 PM
they're getting bored it sounds like.. maybe perhaps look into getting interactive games like Trivia, hangman, etc that can be played while the channel chatter isn't entertaining enough. Get to the root of the problem to solve it =)

Check out www.mirc.net, www.mircscripts.org, www.hawkee.com and other mIRC sites for scripts/addons that will have games.

But a limit on the triggers WOULD be a good thing to have regardless. The thread that was pointed out that is about text flood discusses the problem and has a few methods of approaching it.
Posted By: sparta Re: script to stop Bot Spam - 27/11/08 06:54 PM
as i said before, use user levels, when people write and trigger the bot, add them to the user section in mirc.

auser spam $address($nick,3)

then use a timer to remove the user from the user list

auser spam $address($nick,3)
timer 1 60 .ruser spam $address($nick,3)

and then do a match to see if the user is that level, then halt the script if it is.
Code:
on *:text:*:#: {
 if ($level($address($nick,3)) != spam) {
 auser spam $address($nick,3)
 timer 1 60 .ruser spam $address($nick,3)
 rest of the code
}

this is one way to solve it, but i guess you can find many more ways to get rid of the spammers.. smile

;---- edit

60 in the timer part is the time before the user will be removed and allowed to trigger your bot again. change it to the value you feel is right.
Posted By: MonkeyMan1988 Re: script to stop Bot Spam - 29/11/08 04:42 AM
Originally Posted By: _Memo
they're getting bored it sounds like.. maybe perhaps look into getting interactive games like Trivia, hangman, etc that can be played while the channel chatter isn't entertaining enough. Get to the root of the problem to solve it =)

Check out www.mirc.net, www.mircscripts.org, www.hawkee.com and other mIRC sites for scripts/addons that will have games.

But a limit on the triggers WOULD be a good thing to have regardless. The thread that was pointed out that is about text flood discusses the problem and has a few methods of approaching it.

That would only compound the problem, i dont want any bot spam in the room, and all that trivia crap is bot spam.
Posted By: genius_at_work Re: script to stop Bot Spam - 29/11/08 06:14 AM
If you don't want bot spam, the easiest solution would be to completely get rid of the triggers that are being abused. That way, there will be nothing to unnecessarily interfere with the normal chatting within the channel.

-genius_at_work
© mIRC Discussion Forums