Project

General

Profile

[Script] Simple script to locally color channel nicks on outgoing messages

Added by Per Amundsen 7 months ago

Uses color "4", change it to 0-15 as needed.

on *:INPUT:#:{
  if (/* iswm $1) {
    return
  }

  var %text $1-, %s 0
  while (%s < $numtok(%text, 32)) {
    inc %s
    var %nick $gettok(%text, %s, 32)
    if ($nick(#, %nick)) {
      %text = $reptok(%text, %nick, $+($chr(3),4,%nick,$chr(3)), 32)
    }
  }

  echo -t $active $replace($prefixuser, $ $+ pnick, $me) %text
  .msg $active $1-
  halt
}