Recursive mass-mode

Platform:  mIRC
Published  Nov 06, 2008
Updated  Nov 09, 2008
An efficient, recursive mass-mode script which accumulates users as arguments to the aliases and applies the mode to them all at once, in groups of the maximum allowed by server, to prevent spamming up the channel. It also doesn't apply modes to those which already have it (i.e. Won't voice users who already have voice).

Simply paste the three aliases into the remote tab of the script editor (alt+r) and then to use it type /all <mode letter>.

Example:
/all +v, /all +h, /all +o, /all +e, etc. for most user modes. (Also -v,-h etc.)

Also: Can use the following aliases to make it easier for yourself:
alias vall { /all +v }
alias hall { /all +h }
alias oall { /all +o }
alias vno { /all -v }
alias hno { /all -h }
alias ono { /all -o }


PS: My first submission! Constructive criticism welcomed.
EDIT: Much improved thanks to comments. Thanks!
EDIT2: Couple of changes. alias all { alla $1 1 0 }
alias alla {
var %m = $1, %i = $2, %n = $3, %curr_nick = $nick(#,%i)
if ( %curr_nick == $null ) {
if ( %n > 0 ) { mode $active $str(%m,%n) $4- }
}
else if ( %n == $modespl ) { mode $active $str(%m,%n) $4- | allb %m %i 0 }
else if ( %m == +v && %curr_nick isvoice # ) { inc %i | allb %m %i %n $4- }
else if ( %m == -v && %curr_nick !isvoice # ) { inc %i | allb %m %i %n $4- }
else if ( %m == +h && %curr_nick ishop # ) { inc %i | allb %m %i %n $4- }
else if ( %m == -h && %curr_nick !ishop # ) { inc %i | allb %m %i %n $4- }
else if ( %m == +o && %curr_nick isop # ) { inc %i | allb %m %i %n $4- }
else if ( %m == -o && %curr_nick !isop # ) { inc %i | allb %m %i %n $4- }
else { inc %i | inc %n | allb %m %i %n %curr_nick $4- }
}
alias allb { alla $1- }

Comments

Sign in to comment.
Xpl0reR   -  Nov 08, 2008
btw, /'s are useless in some contexts.

You could remove them.
 Respond  
mountaindew   -  Nov 06, 2008

I assume that sets itself to the max allowed on the server?

Exactly.
 Respond  
bigrat2   -  Nov 06, 2008
Thanks for the comments guys. And wow, $modespl is awesome, didn't know about that. :) I assume that sets itself to the max allowed on the server?

I've made some minor adjustments, shouldn't take long to make it be able to do multiple modes.
 Respond  
mountaindew   -  Nov 06, 2008
Yea, use $modespl and then mode $active + $+ $str(v,$modespl) $3-
 Respond  
Xpl0reR   -  Nov 06, 2008
undernet uses 6 modes max. and why do you restrict this to +v ?

you could make it for +o +b too :)
 Respond  
Gummo   -  Nov 06, 2008
Interesting method, but you should really var %i, %n and %curr_nick, rather than setting them permanently..

Also, not all servers allow 10 modes at once, requiring the use of $modespl for correct function.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.