mIRC Home    About    Download    Register    News    Help

Print Thread
script to stop Bot Spam #206865 27/11/08 08:02 AM
Joined: Sep 2008
Posts: 13
M
MonkeyMan1988 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
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)

Re: script to stop Bot Spam [Re: MonkeyMan1988] #206866 27/11/08 11:17 AM
Joined: Aug 2006
Posts: 183
T
Thrull Offline
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
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.


Yar
Re: script to stop Bot Spam [Re: MonkeyMan1988] #206867 27/11/08 12:59 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: script to stop Bot Spam [Re: MonkeyMan1988] #206870 27/11/08 03:10 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156

Re: script to stop Bot Spam [Re: DJ_Sol] #206873 27/11/08 03:44 PM
Joined: Sep 2008
Posts: 13
M
MonkeyMan1988 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
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

Re: script to stop Bot Spam [Re: MonkeyMan1988] #206875 27/11/08 04:08 PM
Joined: Sep 2008
Posts: 62
_
_Memo Offline
Babel fish
Offline
Babel fish
_
Joined: Sep 2008
Posts: 62
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.

Re: script to stop Bot Spam [Re: MonkeyMan1988] #206879 27/11/08 06:54 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.

Last edited by sparta; 27/11/08 06:55 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: script to stop Bot Spam [Re: _Memo] #206933 29/11/08 04:42 AM
Joined: Sep 2008
Posts: 13
M
MonkeyMan1988 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
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.

Re: script to stop Bot Spam [Re: MonkeyMan1988] #206935 29/11/08 06:14 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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