Nick Highlighter

By MixXeduP on Jan 24, 2011

This is an Highlighter i usually use.
And it maybe got some bugs, But as you see im not an expert in msl. :P

Well just give it a try.

Replace the nick's with your own nicknames.

on *:load: {
  hmake flood 150
}
on *:start: {
  hmake flood 150
}
on $*^:text:/(nick1|nick2|nick3|Nick4|Nick5|Nck6|Nick7)/Si:*:{
  hinc -u5 flood $nick 1
  if ($hget(flood,$nick) > 5) {  ignore $nick }
  if ($chan == $active) haltdef
  else Echo -a 7-14 HighLight 7-7(14 $+ $nick $+ 7)-14 Highlighted you in $chan $3 7"14 $+ $1- $+ 7"
  echo -t $chan < $+ $nick $+ > $replace($1-,$me,$me3)

  haltdef
}
alias me3 {
  return $+($chr(2),$chr(3),4,$me,$chr(2),$chr(3),01) 
}

Comments

Sign in to comment.
Jethro   -  Jan 24, 2011

You can get rid of the on load and on start event and add the -m switch:

hinc -mu5 flood $nick 1

By specifying the slot size is sort of effortless since hash tables can store unlimited amount of data regardless of how big or small the slot you choose. And also the fact that you're only retaining the hash table for 5 seconds. Even though the bigger the size of hash table, the faster it'll work. The default 100 slots is more than sufficient.

P.S. I think that using a 5-second hash table for the trigger flood control is a bit excessive, while the use of dynamic variables will do the job amply.

 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.