Code: Select all
bind pub n|n .mcheck check_all
set excnickX2 {
"chanserv"
}
proc check_all {nick host handle chan text} {
global excnickX2
# grab the channel members list and exclude the bot from it
set userList [chanlist $chan]
set pos [lsearch -nocase $userList $::botnick]
set userList [lreplace $userList $pos $pos]
# set kick reason
set reasonX55 [join [lrange [split $text ] 0 end]]
if {$reasonX55 eq ""} { set reasonX55 Requested }
# build the list with only people that arent on chan access list
foreach user [split $userList] {
if {![isvoice $user $chan] && ![isop $user $chan] && ![ishalfop $user $chan] && ![matchattr [nick2hand $user] fnmo|fnmo $chan] && [lsearch -nocase $excnickX2 $user] == -1} { lappend voiceList $user }
}
set max 4
if {[info exists voiceList]} {
set len [llength $voiceList]
while {$len > 0} {
if {$len > $max} {
set mode [string repeat "v" $max]
set users [join [lrange $voiceList 0 [expr {$max - 1}]]]
set voiceList [lrange $voiceList $max end]
incr len -$max
} else {
set users [join $voiceList]
set len 0
}
putserv "NOTICE $nick [join $users ","]"
}
puthelp "NOTICE $nick :ALL non Voiced/opped/halfopped users on $chan."
} else {
puthelp "NOTICE $nick :No Voiced/opped/halfopped on $chan."
}
}
thnx in advance