|
DaveC
|
Think it would have worked if you made the following type change (on each one)
var %temptext $replace($left($gettok(%temptext,%i,3),1),0,15)
to
var %temptext [color:blue]$puttok(%temptext,[/color] $replace($left($gettok(%temptext,%i,3),1),0,15) [color:blue],%i,3)[/color]
But i think you set the bar higher than you needed to for this one. you can just uses $replacex, just ensure you process the 0N values first, then the 1N, then N on ^*:text:*:#channel: { echo -itlbfmrc normal $chan $+(<,$nick,>) $replacex($1-,00,00 ,01,01 ,02,02 ,03,03 ,04,04 ,05,05 ,06,06 ,07,07 ,08,08 ,09,09 ,10,10 ,11,11 ,12,12 ,13,13 ,14,14 ,15,15 ,0,0 ,1,1 ,2,2 ,3,3 ,4,4 ,5,5 ,6,6 ,7,7 ,8,8 ,9,9 ) | haltdef }
on ^*:action:*:#channel: { echo -itlbfmrc action $chan * $nick $replacex($1-,00,00 ,01,01 ,02,02 ,03,03 ,04,04 ,05,05 ,06,06 ,07,07 ,08,08 ,09,09 ,10,10 ,11,11 ,12,12 ,13,13 ,14,14 ,15,15 ,0,0 ,1,1 ,2,2 ,3,3 ,4,4 ,5,5 ,6,6 ,7,7 ,8,8 ,9,9 ) | haltdef }For anyone who might be reading that and going "but there all the same?!?!?!" Yes they are, but the idea is you replace the one you want to replace with the new color, ie: red to blue is ,04,12 & ,4,12 and/or blue to grey ,12,15 NB: red being blue well not then convert to grey since $replacex well not effect replaced items, 1's replace wont effect 14 say , becuase 14 has already been replaced, even if it was with itself. and incase that line is hard to understand (i have to admit its not the clearest thing in the world)
on ^*:text:*:#channel: { filter.colors normal $1- }
on ^*:action:*:#channel: { filter.colors action $1- }
alias -l filter.colors {
;$1 = normal / action
;$2 = text
;
; %cN represents ctrl-kN color codings in text, set desired replacment value for each below.
;
; **** It is your responsibility to ensure only valid values are used (0 to 15) ****
;
var %c0 = 0
var %c1 = 1
var %c2 = 8
var %c3 = 3
var %c4 = 4
var %c5 = 5
var %c6 = 6
var %c7 = 7
var %c8 = 3
var %c9 = 9
var %c10 = 10
var %c11 = 11
var %c12 = 12
var %c13 = 13
var %c14 = 14
var %c15 = 15
;
;Do not adjust the remaining values below here.
;
var %c00 = $+(,$right($+(0,%c0),2)))
var %c01 = $+(,$right($+(0,%c1),2)))
var %c02 = $+(,$right($+(0,%c2),2)))
var %c03 = $+(,$right($+(0,%c3),2)))
var %c04 = $+(,$right($+(0,%c4),2)))
var %c05 = $+(,$right($+(0,%c5),2)))
var %c06 = $+(,$right($+(0,%c6),2)))
var %c07 = $+(,$right($+(0,%c7),2)))
var %c08 = $+(,$right($+(0,%c8),2)))
var %c09 = $+(,$right($+(0,%c9),2)))
var %c0 = $+(,%c0)
var %c1 = $+(,%c1)
var %c2 = $+(,%c2)
var %c3 = $+(,%c3)
var %c4 = $+(,%c4)
var %c5 = $+(,%c5)
var %c6 = $+(,%c6)
var %c7 = $+(,%c7)
var %c8 = $+(,%c8)
var %c9 = $+(,%c9)
var %c10 = $+(,%c10)
var %c11 = $+(,%c11)
var %c12 = $+(,%c12)
var %c13 = $+(,%c13)
var %c14 = $+(,%c14)
var %c15 = $+(,%c15)
;
echo -itlbfmrc $1 $chan $iif($1 == normal,$+(<,$nick,>),* $nick) $replacex($2-,00,%c00 ,01,%c01 ,02,%c02 ,03,%c03 ,04,%c04 ,05,%c05 ,06,%c06 ,07,%c07 ,08,%c08 ,09,%c09 ,10,%c10 ,11,%c11 ,12,%c12 ,13,%c13 ,14,%c14 ,15,%c15 ,0,%c0 ,1,%c1 ,2,%c2 ,3,%c3 ,4,%c4 ,5,%c5 ,6,%c6 ,7,%c7 ,8,%c8 ,9,%c9 )
haltdef
}There is of course alot more processing that mirc must do in that but its easier to understand, when it comes to changing a value.
|