Mass voice, halfop, op, ban with address(user,2)
alias MassMode {
var %i 1,%g,%n $2-,%s $left($1,1),%m $mid($1,2,1)
if %m = b {
%n = ""
while $gettok($2-,%i,32) {
%n = %n $address($v1,2)
inc %i
}
}
while %n {
%g = $gettok(%n,1- $+ $modespl,32)
mode # $+(%s,$str(%m,$numtok(%g,32))) %g
%n = $gettok(%n,$calc($modespl +1) $+ -,32)
}
}
You may want to have a if/else for $modespl
if a server does not report it; although I've
never seen a server not report it.
Of all those $address(0-9), not all are useful.
Also does mass ban with $address(user,2)
I actually have it named MassMode.
alias changeState {
var %i 1,%g,%n $2-,%s $left($1,1),%m $mid($1,2,1)
if %m = b {
%n = ""
while $gettok($2-,%i,32) {
%n = %n $address($v1,2)
inc %i
}
}
while %n {
%g = $gettok(%n,1- $+ $modespl,32)
mode # $+(%s,$str(%m,$numtok(%g,32))) %g
%n = $gettok(%n,$calc($modespl +1) $+ -,32)
}
}
I like the way it's written except I'd test that
the item ends up where it should instead of:
if (%item_to != %item_from) {
hdel %table_to %item_to
hdel %table_from %item_from
}
I'd also want a verbose option; something along the lines of:
Foo was moved from TableFoo to TableBar which now reads: Yada Yada Yada...
Bar was moved from TableBar to TableFoo which now reads: Blah Blah Blah...
(I'd truncate the actual data to a reasonable length to keep it in one line.)
That's some serious halt abuse.
Hard coded colors are a bad idea. No one will run your code because noobs
won't be able to pick out all the broken codes and vets won't want to.
Try: //echo -ac action blah blah $+($chr(3),$color(info).dd) more blah blah blah
Even better set up colors 2-13 in alias with variables for all $color()s:
set %k-A $+($chr(3),$color(info).dd)
set %k-B $+($chr(3),$color(action).dd)
set %k-C $+($chr(3),$color(text).dd)
etc. (be sure to aways use .dd or you'll learn why)
Save colors [0,1,14,15] as background colors
Do not stray far from default colors to setup themes
based on those four background colors, but do shift
them slightly for better contrast with each on the four
background colors.
Make use of /color to shift them on theme change.
;Change the active color scheme to mIRC Classic
/color -s \"mIRC Classic\"
;Change the color of 1 in the color palette to purple (128, 0, 128).
//color 1 $rgb(128,0,128)
;Restore the original color
/color -r 1
;Change the color of the background to 1 (1 by default of black)
/color Background 1
About 80% of women and half the
guys will use light gray #15 as background, the 2nd
most used bg color will be black #1 followed by white #0.
It would be an odd duck that chooses dark gray #14, but
I exclude it as a color option just to round out the numbers.
To fix background colors used in messages
look at this post: http://hawkee.com/snippet/2795/
PROTIP: Only connect to freenode where colors are forbidden
Unfortunately if you change themes in the pallet editor (crayons)
there is no signal of that change (that I currently know of) to
initiate a script to fix all the other colors as in nicklist
colors or to shift all the $RGB values of colors for better
contrast. Khaled has failed to connect the dots in several
areas that you don't really figure out until you try to
take a script to it's logical conclusion.