Usage :
type in $chan window /mass with params, /mass +/-o or /mass +/-h or /mass +/-v or /mass +/-b. if no params are entered, you get echo that says that you must enter something.
why single line ?? because that way you cannot trigger mode flood prots
:)
; Single line output mass modes
; by ch1zra
; ch1zra@gmail.com
; http://uptheirons.co.sr/
alias mass {
if ($me isop $chan) {
var %num = $nick(#,0)
; getting the number of users on $chan
var %i 1
while (%i <= %num) {
var %tmpnick = $nick(#,%i)
if (%tmpnick != $me) {
var %tnk %vnikz
var %vnikz %tmpnick %tnk
}
inc %i
}
if ($1 == $null) {
; if no params are entered
echo -a $+ $color(info) $+ [Modes] You must enter which mode to be used. -[(supported +/- vohb)]-
}
if (+v isin $1-) {
; giving mass voice
mode # + $+ $str(v,$calc(%num - 1)) %vnikz
}
if (-v isin $1-) {
; giving mass devoice
mode # - $+ $str(v,$calc(%num - 1)) %vnikz
}
if (+o isin $1-) {
; giving mass op
mode # + $+ $str(o,$calc(%num - 1)) %vnikz
}
if (-o isin $1-) {
; giving mass deop
mode # - $+ $str(o,$calc(%num - 1)) %vnikz
}
if (+h isin $1-) {
; giving mass hop
mode # + $+ $str(h,$calc(%num - 1)) %vnikz
}
if (-h isin $1-) {
; giving mass dehop
mode # - $+ $str(h,$calc(%num - 1)) %vnikz
}
if (+b isin $1-) {
; giving mass ban
mode # + $+ $str(b,$calc(%num - 1)) %vnikz
}
if (-b isin $1-) {
; giving mass unban
mode # - $+ $str(b,$calc(%num - 1)) %vnikz
}
}
}
Well, from the looks of it, this script should work. However.... it should do exactly the same thing as xdaemon\'s here: http://hawkee.com/snippet.php?snippet_id=696 except that you dont string muliple mode changes, or mine here: http://hawkee.com/snippet.php?snippet_id=670 only difference is you\'d have to add a while loop to get all the nick in the chan to be affected and change the $snicks part... overall, I\'d say you should look into $modespl .... besides, you have it stringing the modes to a length equal to the number of people in a chan. so like xdaemon said. It wont do the whole chan, it should only do the first few (however many are in $modespl)