i was trying to get this mass voice tcl (with delay) to voice first stacked nicks of 6 (or less if there are less then 6 to voice) instant and the rest with delay, but i couldnt figure a way to achieve this perhaps someone of you knows a of a proper method to achieve this.
Thanks i advance,
Code: Select all
bind pub -|- .mv voice_all
bind pub -|- !mv voice_all
proc voice_all {nick host hand chan text} {
if {![isop $nick $chan] && ![ishalfop $nick $chan] && ![matchattr $hand o|o $chan]} { return 0 }
set userList [chanlist $chan]
set pos [lsearch -nocase $userList $::botnick]
set userList [lreplace $userList $pos $pos]
foreach user $userList {
if {![isvoice $user $chan] && ![isop $user $chan] && ![ishalfop $user $chan] && ![matchattr [nick2hand $user] of|of $chan]} { lappend voiceList $user }
}
# define the max amount of modes per line
set max 6
# op all the members in the above built voice list
if {[info exists voiceList]} {
set voiceList [lsort -unique $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 mode [string repeat "v" $len]
set users [join $voiceList]
set len 0
}
incr counter 1
after [expr {$counter*4000}] [list putnow "MODE $chan +$mode $users"]
}
puthelp "NOTICE $nick :Voiced all users on $chan."
} else {
puthelp "NOTICE $nick :Nobody needed to be Voiced on $chan."
}
}
Eggdrop community