set list_of_chans "#chan1 #chan2"
global botnick nick
# interval in minutes between checks.
set check_interval 30
# allowed time in minutes for an op to be idle.
set op_allowed_time 30
# allowed time in minutes for a voiced user to be idle.
#set vo_allowed_time 10
# nicks to be exempted from Deop/devoice
set exclude_nicks "nick1;nick2;"
set exclude_nicks [string tolower $exclude_nicks]
proc inactive_checker { chan } {
global exclude_nicks op_allowed_time botnick
if {![botisop $chan]} { return 0 }
foreach user [chanlist $chan] {
set user [string tolower $user]
if {![string match "*$user;*" $exclude_nicks] && ![matchattr [nick2hand $user $chan] f] } {
if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $ch
an] >= $op_allowed_time)} {
putserv "mode $chan -ok $user Idle.Op.SaP-Control"
}
}
}
}
proc run_checking_timer { } {
global list_of_chans check_interval
foreach check_chan [split $list_of_chans] {
inactive_checker $check_chan
}
timer $check_interval run_checking_timer
}
timer $check_interval run_checking_timer
putlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."
This script should except the users that have +f flag, but it doesn't, only the nick except works, but I need the flag except too..
Please help, thanks in advance.
if {![string match "*$user;*" $exclude_nicks] && ![matchattr [nick2hand $user $chan] f] }
set list_of_chans "#chan1 #chan2"
global botnick nick
# interval in minutes between checks.
set check_interval 30
# allowed time in minutes for an op to be idle.
set op_allowed_time 30
# allowed time in minutes for a voiced user to be idle.
#set vo_allowed_time 10
# nicks to be exempted from Deop/devoice
set exclude_nicks "nick1;nick2;"
set exclude_nicks [string tolower $exclude_nicks]
proc inactive_checker { nick chan text } {
global exclude_nicks op_allowed_time botnick
if {![botisop $chan]} { return 0 }
set fnick [lindex $text 0]
set userhand [nick2hand $fnick]
foreach user [chanlist $chan] {
set user [string tolower $user]
if {![string match "*$user;*" $exclude_nicks] && ![matchattr $userhand o|o $chan] || [matchattr $userhand f|f $chan]} {
if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $chan] >= $op_allowed_time)} {
putserv "mode $chan -ok $user Idle.Op.SaP-Control"
}
}
}
}
proc run_checking_timer { } {
global list_of_chans check_interval
foreach check_chan [split $list_of_chans] {
inactive_checker $check_chan
}
timer $check_interval run_checking_timer
}
timer $check_interval run_checking_timer
putlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."
set list_of_chans "#chan1 #chan2"
global botnick nick
# interval in minutes between checks.
set check_interval 30
# allowed time in minutes for an op to be idle.
set op_allowed_time 30
# allowed time in minutes for a voiced user to be idle.
#set vo_allowed_time 10
# nicks to be exempted from Deop/devoice
set exclude_nicks "nick1;nick2;"
set exclude_nicks [string tolower $exclude_nicks]
proc inactive_checker { chan } {
global exclude_nicks op_allowed_time botnick
if {![botisop $chan]} { return 0 }
foreach user [chanlist $chan] {
set user [string tolower $user]
set userhand [nick2hand $user]
if {![string match "*$user;*" $exclude_nicks] && ![matchattr $userhand o|o $chan] || [matchattr $userhand f|f $chan]} {
if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $chan] >= $op_allowed_time)} {
putserv "mode $chan -ok $user Idle.Op.SaP-Control"
}
}
}
}
proc run_checking_timer { } {
global list_of_chans check_interval
foreach check_chan [split $list_of_chans] {
inactive_checker $check_chan
}
timer $check_interval run_checking_timer
}
timer $check_interval run_checking_timer
putlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."