Mass Highlight

By ChanZin on Apr 10, 2010

This script has been requested by a friend who loves highlight everyone when he joins channel to say "Hello" :P

Usage:
/masshl -ohvr

(
Use "o" if you want to hl ops
Use "h" if you want to hl halfops
Use "v" if you want to hl voices
Use "r" if you want to hl normal users

If you want to hl everyone use:
/masshl
)

Examples:
/masshl -o Hello OPs
/masshl -h Hello HalfOPs
/masshl -oh Hello OPs and HalfOps

If you want, select all nicks you want to hl in nicklist and righ-click them and after click on "Mass HL"

alias masshl {
  if ($left($1,1) == -) { var %massu $iif(a isin $1 || o isin $1 || h isin $1 || v isin $1 || r isin $1,$remove($1,-),a) | tokenize 32 $2- }
  else { var %massu a }
  var %x 1 | var %msg $iif($1,=> $+ $1-) | tokenize 32
  while (%x <= $nick(#,0,%massu)) { if ($nick(#,%x,%massu) != $me) { tokenize 32 $1- $nick(#,%x,%massu) }
    inc %x 
  }
  tokenize 32 $1- %msg
  while ($$1-) { say $1-30 | tokenize 32 $31- }
}
menu nicklist {
  .Mass HL {
    var %msg $?="Message?" | var %msg $iif(%msg,=> $+ %msg) | tokenize 32 $replace($snicks,$chr(44),$chr(32))
    tokenize 32 $1- %msg
    while ($$1-) { say $1-30 | tokenize 32 $31- }
  }
}

Comments

Sign in to comment.
Flaco22   -  Feb 20, 2011

hey guys, how do i change this snippet in order to mass highlight people on command? like a !hl command or something?

We really need it in our channel, thanks in advance!

 Respond  
Jethro   -  Apr 10, 2010

Yup I could, but I don't particularly fancy regsubex loop for this. Yours is 105 bytes. (with the word alias it will be added up to 111 bytes) And here is mine:

alias masshl var %x $$1- | while ($nick(#,$0)) tokenize 32 $1- $v1 | say $remove($2-,$me) $+ : %x

which is 97 bytes. (without the word alias, it's 91 bytes)
Even if you change $chan to #, yous will still be bigger in size.

 Respond  
Ghost-writer   -  Apr 10, 2010

So you couldnt just use somthing like..

masshl say $remtok($regsubex($str(.,$nick($chan,0)),/./g,$nick($chan ,\n ) $+ $chr(32)),$me,32) $+ : $$1-
 Respond  
Jethro   -  Apr 10, 2010

Ghost-writer, the reason the regsubex loop wasn't used is that it'll message the whole room, including the client running the code.

 Respond  
Ghost-writer   -  Apr 10, 2010
masshl say $regsubex($str(.,$nick($chan,0)),/./g,$nick($chan ,\n ) $+ $chr(32)) $+ : $$1-

Game.

 Respond  
Jethro   -  Apr 10, 2010
alias masshl {
  var %x, %y 1
  while ($nick(#,%y)) { 
    if ($v1 != $me) { 
      %x = %x $v1 
    }
    inc %y
  }
  msg # $v1 %x $+ : $$1-
}

You have to be sure the $1 is entered by adding an extra dollar sign, or else you'll get all the nicks without the message.

 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.