Does this do what you want?vigilante wrote:Anyone whose willing to help me with making this tcl?
It should simply, grab the idle time of a user, if it's more than 2 minutes, it kicks/bans them out of the channel. I want to be able to set channel flags, like if the channel is, +antiidle it detects if not, then nothing.
Thanks
Did you do as instructed? chanset, configured, etc..vigilante wrote:EVen did that
Code: Select all
proc aidle:checkidle { min hour day month year } {
global botnick flags kickop kickvoice
putcmdlog "aidle check running.."
foreach chan [channels] {
if {![channel get $chan "maxidle"]} {continue}
foreach nick [chanlist $chan] {
if {$nick == $botnick} {continue}
if {([isop $nick $chan]) && ($kickop)} {continue}
if {([isvoice $nick $chan]) && ($kickvoice)} {continue}
if {[matchattr [nick2hand $nick] $flags] == 1} {continue}
if {[getchanidle $nick $chan] > [channel get $chan "maxidle"]} {
putcmdlog "aidle kicking $nick on $chan - idle [channel get $chan "maxidle"]"
aidle:punish $chan $nick [channel get $chan "maxidle"]
}
}
}
}
#########################################################################################################