Bot Query (With Anti-Flood)

By lavamike on Dec 02, 2008

Well I use this for my bot, so i figured, meh, why not release? :P

Basically !mycommand and that sample you replace with w.e command you want the person to Query to your bot or yourself or whatever. If they spam 6 lines in 3 seconds, it will ignore that person (/ignores them & Adds their nickname to a .ini and checks to see if they are ignored, because /ignore won't block query's if the query window is already opened.

Also, Don't forget to change the '#YourChannelHere'

P.S: I tested it and found no problems but please tell me if I made a mistake as I had to edit it from it's original version in order to post it here :)

Screenshot:
Image

; By Lavamike
; Thanks To:
; Scakk - Ignore Address & Query Closing
; mountaindew - .timer (Silenced) & Query Closing

on *:text:*:?:{
  if ( $1 = !mycommand ) {
    msg $nick It Works! :O
    halt
  }
  msg $nick  • Unknown Input ( $+ $1- $+ )
  msg #YourChannelHere 4[ $+ $time $+ ]12 ( $+ PM $+ ) 7 $nick $+ : 4 $1-
  inc -u3 %spam. [ $+ [ $nick ] ]
  if (%spam. [ $+ [ $nick ] ] == 6) {
    msg $nick 4[ $+ $time $+ ]12 Ignoring $nick - 3 Minutes - Flooding
    msg #YourChannelHere 4[ $+ $time $+ ]12 Ignoring $nick - 3 Minutes - Flooding
    ignore $address($nick,1)
    close -m $nick
    .timer 1 180 /ignore -r $address($nick,1)
    .timer 1 180 /notice $nick Ignore Rule Lifted
    .timer 1 180 /msg #YourChannelHere Ignore Rule Lifted ( $+ $nick $+ )
    halt
  }
}

Comments

Sign in to comment.
lavamike   -  Apr 21, 2009

@TwistedHumor

Fixed now, shoulda been ( $+ $1- $+ )

 Respond  
TwistedHumor   -  Dec 16, 2008

(21:12:36) (Lavamike) Enjoy The Script ;)
(21:12:36) (Bot) • Unknown Input (Enjoy)

Seems ( $+ $1 $+ ) isn't whats needed...

 Respond  
lavamike   -  Dec 04, 2008

@ Greenlanter420

I'm not really sure what you mean? Could you explain in a bit' more detail or something, please?

 Respond  
greenlanter420   -  Dec 04, 2008

my comment is this its a great idea but it would be better if it just covered all commands via pm instead of having to set each command with another copy of the script or something to that effect another thing is that I think the idea of messaging the channel to basically show the person is flooding the bot is a great idea but not on every message just like it does in the end to show they have been banned.

I just edited it on my end to do this and of course this is just a couple ideas it seems nice otherwise.

 Respond  
Noutrious   -  Dec 04, 2008
on *:OPEN:?:closemsg $nick

Works even better..

 Respond  
lavamike   -  Dec 03, 2008
  • Removed ini
  • Added Address Ignore
  • Added Closing PM Window
 Respond  
Scakk   -  Dec 02, 2008

1)

$address will not work as you have it. You need to use

$address($nick,2) os another number in place of the 2.

2)

You could put

/cose -m $nick

below the /ignore line that way you ignore them and close the query.

 Respond  
guest598594   -  Dec 02, 2008

To close the query, close -m $nick in an on open event.

 Respond  
lavamike   -  Dec 02, 2008

@ Scakk:

  1. I'm using $address now :)
  2. a. I don't know how to close the query window automatically
    b. Without closing the query window automatically -p won't matter.
    I've tested it and it says in the help file:
    Note: If you have a /query window open with someone, private messages from them won't be ignored even if their address matches an ignore address.

@ mountaindew

  1. Done & Edited :)
 Respond  
guest598594   -  Dec 02, 2008

Silence the timers --> .timer

 Respond  
Scakk   -  Dec 02, 2008

Since you are ignoring them in query why not add them to the ignore list ( I would use $address($nick,2) instead of just $nick ) and then have it automatically close the query window.

Also for queries it is /ignore -p

 Respond  
lavamike   -  Dec 02, 2008

Enjoy ;)

If you find any mistakes, please let me know so I can fix them & feel free to suggest anything :P

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.