###### configuration #####
die "DEOp on Idle STOP"
# set the interval between idlechecks in minutes
set idle_interval "1"
# set the idle-time an operator must have to get deopped by the bot in minutes
set idle_time "3"
# [0/1] do we want to exclude bots from being idle-deopped?
# generally a good idea
set idle_exclude_bots "1"
# set channels where idle-deopper should be active seperated by spaces
# set to " " for all
set idle_channels " "
#########################################################################################
## End of configuration ### Do Not edit anything here! ##################################
#########################################################################################
bind raw - 317 idlecheck
proc idlecheck {nick int arg} {
global idle_time idle_channels
set nick [string tolower [lindex $arg 1]]
set idle [string tolower [lindex $arg 2]]
set minutesidle [expr $idle / 60]
if {$minutesidle > $idle_time} {
dccbroadcast "$nick has too much idle"
foreach channel $idle_channels {
putserv "MODE $channel -o $nick"
putserv "NOTICE $nick :You have been idle $idle_time Minutes on $channel Forced DeOp."
putlog "Took op from $nick on $channel (too much idle)"
}
}
}
proc perform_whois { } {
global idle_channels botnick idle_exclude_bots idle_interval
if {$idle_channels == " "} {
set idle_temp [channels]
} else {
set idle_temp $idle_channels
}
foreach chan $idle_temp {
dccbroadcast "Now checking \002$chan\002 for idle"
foreach person [chanlist $chan] {
if { [isop $person $chan]} {
if {$idle_exclude_bots == 1} {
if {(![matchattr [nick2hand $person $chan] b]) && ($person != $botnick)} { putserv "WHOIS $person $person" }
}
if {$idle_exclude_bots == 0} {
if {$person != $botnick} { putserv "WHOIS $person $person" }
}
}
}
}
if {![string match "*time_idle*" [timers]]} {
timer $idle_interval perform_whois
}
}
if {![string match "*time_idle*" [timers]]} {
timer $idle_interval perform_whois
}
putlog "DEOp on idle - deop.tcl \002LOADED\002!"
It's work, and then i modify so it can devoice and save it to devoice.tcl
putserv "MODE $channel -v $nick"
putserv "NOTICE $nick :You have been idle $idle_time Minutes on $channel Forced DeVoiced."
putlog "Took voice from $nick on $channel (too much idle)"
if { [isvoice $person $chan]} {
That work only if they load one by one ( load only deop.tcl or only devoice.tcl), but if i load together only deop.tcl work. any help me please...