Can you tell me how to modify this script, to make it WORKING only with the users who are in the bot userlist with +o flag, and not to work (except the users) who have +mn?
Code: Select all
variable opchan "#test"
variable idletime 480
bind time - "* * * *" deop_user
variable oplist ""
proc deop_user {a b c d e} {
global opchan idletime oplist
set users [lrange [chanlist $opchan] 1 end]
foreach user $users {
if {[getchanidle $user $opchan] >= $idletime && [isop $user $opchan] && ![isbotnick $user]} {
putserv "MODE $opchan -o $user"
lappend oplist [getchanhost $user $opchan]
} elseif {[getchanidle $user $opchan] < $idletime && ![isop $user $opchan]} {
if {[lsearch -exact $oplist [getchanhost $user $opchan]] != -1} {
putserv "MODE $opchan +o $user"
}
}
}
}