This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
GeneticBro
Voice
Posts: 3 Joined: Thu Jan 06, 2011 2:34 am
Post
by GeneticBro » Thu Jan 06, 2011 2:37 am
Hello,
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"
}
}
}
}
Big thanks in advance!
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Thu Jan 06, 2011 6:51 am
Code: Select all
foreach user $users {
if {[getchanidle $user $opchan] >= $idletime && [isop $user $opchan] && ![isbotnick $user]} {
Change the above to look like it does below...
Code: Select all
foreach user $users {
if {[matchattr [nick2hand $user] mn|mn $chan]} { continue }
if {[getchanidle $user $opchan] >= $idletime && [isop $user $opchan] && ![isbotnick $user]} {