rendered paste bodyalias color {
if ($regex($1,/on/Si)) { .enable #cinput | echo -ea Color Turned On }
elseif ($regex($1,/off/Si)) { .disable #cinput | echo -ea Default Restored }
}
alias setcolor {
if (!$1) { echo -ea 0,1 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 }
else {
set %color1 $iif($regex($1,/\d/),0 $+ $1,$1)
set %color2 $iif($regex($1,/\d/),0 $+ $2,$2)
echo -ea Color 1 set to: %color1 $chr(124) Color 2 set to: %color2
}
}
#cinput on
on *:INPUT:#:{
HALTDEF
if ($left($1,1) == /) { $iif($left($1,2) == //,$($1-,2),$1-) | halt }
else {
tokenize 32 $replace($1-,$chr(32),$chr(59))
var %x 0 , %c1 %color1 , %c2 %color2
while (%x < $len($1)) {
inc %x
var %text = %text $+ $+($chr(3),$iif(2 // %x,%c1,%c2)) $+ $mid($1,%x,1)
}
.msg $chan $replace(%text,$chr(59),$chr(32)) | echo $chan $enclose($mytime) $colornick($me,$chan) $chr(187) $replace(%text,;,$chr(32))
}
}
#cinput end