adding a nick completer to an acronym script ?!? - 30/05/05 06:08 PM
Can anyone help me on this please? I tried it this way:
The script should replace the first word if it is a nick and if it has a : as the most right character.
The acronyms are replaced correctly (of course) but it doesn't change the nick.
Any help is welcome.
SchwarzeSeele
The script should replace the first word if it is a nick and if it has a : as the most right character.
Code:
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
The acronyms are replaced correctly (of course) but it doesn't change the nick.
Any help is welcome.
SchwarzeSeele