Do you know of any with settings like 4 times in 10 seconds? These ones only let you set a time they can't part join after they join.
some chatters who use java chat interface go in and out of room maybe 3 times then they stick, however some go in and out a million times till someone kicks em... is why I want bot to kick with a message that they need to update java.
#######################################
# Flyby.tcl by KuNgFo0 (www.eggfaq.com)
#VERSION 0.1
#DESCRIPTION Anti-flyby script (for against people joining then immediately parting channels).
# Set the next line as the kick msg you want to say
set flyby_msg "update your java and come back"
# Set the next line as the max duration between joining and parting in seconds
set flyby_time 10
# Set the next line as the length for the ban in minutes
set flyby_bantime 1
# Set the next line as the channels you want to run in
set flyby_chans "#testchannel1 #testchannel2"
proc join_flyby {nick uhost hand chan} {
global flyby_time flyby_chans flyby_data
if {(([lsearch -exact [string tolower $flyby_chans] [string tolower $chan]] != -1) || ($flyby_chans == "*")) && (![matchattr $hand b]) && (![isbotnick $nick]) && (![matchattr $hand f|f $chan]) && (![info exists flyby_data([set hash [protect_hash $nick $chan]])])} {
set flyby_data($hash) 1
utimer $flyby_time [list protect_unset flyby $hash]
}
}
proc part_flyby {nick uhost hand chan {msg ""}} {
global flyby_msg flyby_bantime flyby_chans flyby_data botnick
if {(([lsearch -exact [string tolower $flyby_chans] [string tolower $chan]] != -1) || ($flyby_chans == "*")) && (![matchattr $hand b]) && (![isbotnick $nick]) && (![matchattr $hand f|f $chan]) && ([info exists flyby_data([set hash [protect_hash $nick $chan]])])} {
newchanban $chan [maskhost $uhost] $botnick $flyby_msg ${flyby_bantime}min
flushmode $chan
putserv "KICK $chan $nick :$flyby_msg"
protect_unset flyby $hash
}
}
# Generate an array-friendly but unique string
proc protect_hash {nick chan} {
global protect_hash_type
set hash [list $nick $chan]
switch -- $protect_hash_type {
md5 { return [md5 $hash] }
encrypt { return [encrypt $hash $hash] }
default { return $tmp }
}
}
# Unset an array hash
proc protect_unset {data hash} {
global $data\_data
if {[info exists $data\_data($hash)]} { unset $data\_data($hash) }
}
bind join - * join_flyby
bind part - * part_flyby
# Find hash generation type
if {[info commands md5] == "md5"} { set protect_hash_type "md5" ; # Eggdrop 1.5 and up } \
elseif {[info commands encrypt] == "encrypt"} { set protect_hash_type "encrypt" ; # Eggdrop up to 1.4 } \
else { set protect_hash_type "default" ; # Shouldn't happen }
putlog "*** Flyby.tcl 0.1 by KuNgFo0 loaded"
I use this script, and you try it. It`ll ban them for 1 minute. Sorry if I didn`t understand your question properly.
cache wrote:Do you know of any with settings like 4 times in 10 seconds? These ones only let you set a time they can't part join after they join.
some chatters who use java chat interface go in and out of room maybe 3 times then they stick, however some go in and out a million times till someone kicks em... is why I want bot to kick with a message that they need to update java.
In AllProtection you can set <times>:<seconds> in which the bot will lock the channel.
if you bothered to research both scripts Alchera pointed you to, you probably would've noticed that xchannel does exactly what you need (and the whole lot more it does - without being huge - is disabled by default)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use
you said you need join flood kick (but not ban), and xchannel has exactly that (which is different from the anti-"revolving door" feature) - configurable punishment (warn, kick or kick+ban) for join flood, via normal eggdrop join flood settings M:N (max M joins in N seconds allowed)
obviously people don't pay too much attention to xchannel's doc header, and/or simply don't get it - and I wonder why, it pretty much explains every single feature of the script and how to use it in plain english
btw if you are going to use it, see the support thread - you need to patch your bot (an easy patch) since apparently those lazy eggheads won't release another version anytime soon (if ever)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use