Skip to content

Instantly share code, notes, and snippets.

@westor7
Created January 7, 2022 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save westor7/543b00f87d7bdbe0fc1c0dabe6447d5d to your computer and use it in GitHub Desktop.
Save westor7/543b00f87d7bdbe0fc1c0dabe6447d5d to your computer and use it in GitHub Desktop.
(AdiIRC) Colorize Nickname Prefix On Channel Messages for valek
ON *:INPUT:#: {
if (!$inpaste) && (!$ctrlenter) && ($comchar !== $left($1,1)) {
.msg $chan $1-
echo -t $chan < $+ $col_prefix($nick($chan,$me).cmode) $+ $me $+ >: $1-
halt
}
}
ON ^*:TEXT:*:#: {
haltdef
window -g1 $chan
echo -t $chan < $+ $col_prefix($nick($chan,$nick).cmode) $+ $nick $+ >: $1-
}
alias -l col_prefix {
if (!$1) { return }
if ($1 == ~) { var %c = $rgb( [ $readini($adiircini,n,colors,color_96) ] ).hex | return $+($chr(4),%c,~,$chr(4)) } ; color_96
if ($1 == &) { var %c = $rgb( [ $readini($adiircini,n,colors,color_95) ] ).hex | return $+($chr(4),%c,&,$chr(4)) } ; color_95
if ($1 == @) { var %c = $rgb( [ $readini($adiircini,n,colors,color_40) ] ).hex | return $+($chr(4),%c,@,$chr(4)) } ; color_40
if ($1 == %) { var %c = $rgb( [ $readini($adiircini,n,colors,color_41) ] ).hex | return $+($chr(4),%c,%,$chr(4)) } ; color_41
if ($1 == +) { var %c = $rgb( [ $readini($adiircini,n,colors,color_42) ] ).hex | return $+($chr(4),%c,+,$chr(4)) } ; color_42
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment