I need tcl when i give .ckick on dcc bot kick all user who have entered on channel 0-10s ago:)
bind dcc n ckick a:ckick
proc a:ckick {handle idx arg} {
set key [lindex $arg 0]
set chan [lindex $arg 1]
if {($chan=="") || (![ischanname $chan])} {putdcc $idx "Usage: .ckick password chan"
return 0}
if {![validchan $chan] || ![botonchan $chan]} {putidx $idx "I'm not on $chan."
return 0}
if {[encrypt $key $key] == "My key"} {putcmdlog "[31m#[0m$handle[31m#[0m tkm $chan"
foreach cupa [chanlist $chan] {
if {[expr [unixtime]-[getchanjoin $cupa $chan]]<10} {return 0}
if {![matchattr [nick2hand $cupa $chan] o|o $chan] && [isop $cupa $chan] && ![isbotnick $cupa]} {lappend kl $cupa}}
if {![info exists kl]} {putidx $idx "I don't see anyone to kick on $chan."
return 0}
mkf $chan $kl} {control $idx chon:SlaveS}
return 0}
proc mkf {c k} {foreach b [bots] {if {[matchattr $b K] && [isop [hand2nick $b $c] $c]} {putbot $b "mk:k $c [lrange $k 0 3]"
if {[set k [lrange $k 4 end]]==""} {return 0} } }
if {[botisop $c]} {putserv "KICK $c [join [lrange $k 0 3] ,] :Sio!"
if {[set k [lrange $k 4 end]]==""} {return 0} } mkf $c $k}
# Someone know what i did wrong? Bot has kick users who are 0-10s in channel Pls help!:)