View Single Post
Old 11-15-2003, 05:38 PM   #18 (permalink)
greffov
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
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
}
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote