on *:text:!update:#:{
.notice $nick checking for ops in the room and adding them to the user list
var %b = 1
while $nick(#,0,o) >= %b {
//echo # %b $nick(#,%b,o)
.auser 10 $nick(#,%b,o)
inc %b
}
.notice $nick checking for ops in the userlist that are not in the room and removing them from the list
var %b = 1
while $ulist(*,10,0) >= %b {
if ($ulist(*,10,%b) !ison #) {
//echo # %b $nick(#,%b,o)
.ruser $v1
inc %b
}
}
.notice $nick voicing those in the room that qualify but aren't voiced
var %b = $nick(#,0,a,v)
while %b > 0 {
if $regex(uc,$nick(#,%b,a,v),/^[^[:alpha:]]*?[A-Z]/) {
//echo # %b $nick(#,%b,a,v)
mode # +v $nick(#,%b,a,v)
}
dec %b
}
.notice $nick checking for people that are in the players list but not in the room and removing them
var %b = 1
while $numtok(%play.list,44) >= %c {
if ($gettok(%play.list,%b,44) !ison #) {
set %play.list $remtok(%play.list,$v1,1,44)
inc %b
}
}
.notice $nick checking for autoplay of all in the room and if on adding them to the players list
var %b = $nick(#,0)
while %b > 0 {
if ($read($mknickfn($nick(#,%c)),s,autoplay) == on) {
set %play.list $addtok(%play.list,$nick(#,%b),44)
}
dec %b
}
.notice $nick Update complete
if %play.list describe # Current Players are %play.list
}