alias acronymreplacer {
if ($findtok($3-,$1,1,32)) {
var %text = $3-
while ($findtok(%text,$1,1,32)) {
if (c isin $chan(#).mode) {
var %text = $strip($reptok(%text,$1,$2,32))
}
else {
var %text = $reptok(%text,$1,$2,32)
}
}
return %text
}
return $3-
}
alias thema {
var %i = 1, %m = $numtok($1-, 32), %w, %result
while (%i <= %m) {
%w = $gettok($1-, %i, 32)
%result = $+( %result , $base(%color1,10,10,2) , $left(%w,1) , , $base(%color2,10,10,2) , $right(%w,-1) )
inc %i
}
if ($isid) { return $+(%result, ) }
}
#LazyBoy on
on 1:input:*: {
if ($left($1,1) != $chr(47)) {
var %text = $1-
[color:blue]
if ($right($1,1) == :) {
var %i = 1
while ($nick($chan,%i)) {
if ($replace($1,:,*) iswm $nick($chan,%i)) {
var %text = $acronymreplacer($nick($chan,%i),$thema(%leftborder $+ $nick($chan,%i)) $+ %rightborder,%text)
goto nextstep
}
inc %i
}
}
:nextstep
[/color]
var %text = $acronymreplacer(lol,$thema(Laughing Out Loud),%text)
[color:red] [...] [/color]
msg $active %text
halt
}
#LazyBoy end