It seemed p2pchat.net holds off a limit of max 12 voices/devoices at a time, so I had to change my script slightly in order to overcome this problem:
Code:
on 1:text:!massvoice:*: {
; find out if we are op and the user issuing the command is op too.
; If not, stop the script...
if ($me !isop $chan || $nick !isop $chan) {
msg $chan Either you ( $+ $nick $+ ) or me ain't op in $chan
halt
}
; iterate through all members in the chan
var %i, %voicestr
set %i 1
; we request only users which have no state (yet)
while ($nick($chan, %i, a, voh)) {
set %voicestr v $+ %voicestr $nick($chan, %i, a, voh)
set %i $calc(%i + 1)
if ($calc(%i % 13) == 0) {
mode $chan + $+ %voicestr
unset %voicestr
}
}
mode $chan + $+ %voicestr
}
on 1:text:!massdevoice:*: {
; find out if we are op and the user issuing the command is op too.
; If not, stop the script...
if ($me !isop $chan || $nick !isop $chan) {
msg $chan Either you ( $+ $nick $+ ) or me ain't op in $chan
halt
}
; iterate through all members in the chan
var %i, %voicestr
set %i 1
; we request only users which have state v
while ($nick($chan, %i, v)) {
set %voicestr v $+ %voicestr $nick($chan, %i, v)
set %i $calc(%i + 1)
if ($calc(%i % 13) == 0) {
mode $chan - $+ %voicestr
unset %voicestr
}
}
mode $chan - $+ %voicestr
}