Advertisement
Guest User

Nick completion

a guest
Apr 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. /set %nickcomp2colores [0|1]
  2. ;/setnc2c Color1 Color2 Extra
  3. alias setnc2c {
  4. set %nc2cColor1 $chr(3) $+ $base($1,10,10,2)
  5. set %nc2cColor2 $chr(3) $+ $base($2,10,10,2)
  6. set %nc2cExtra $3
  7. }
  8.  
  9. Parte 2
  10.  
  11. #mod^ncomp on
  12. alias mod^ncomp {
  13. if (%fullnickComp != on) {
  14. if ($1 ison $active ) {
  15. %nick^comp = $1
  16. if ($gettok(%mod^ncomp,3,8) != off) { %nick^comp = $ [ $+ [ $replace($ifmatch,<t>,%nick^comp) ] ] }
  17. %nick^comp = $gettok(%mod^ncomp,1,8) $+ %nick^comp $+ $+ $gettok(%mod^ncomp,2,8) $+
  18. %mi^frase = $deltok(%mi^frase,1,32)
  19. }
  20. }
  21. else {
  22. %mi^frase = $null
  23. var %token = 1
  24. while ($gettok($1-,%token,32) != $null) {
  25. var %word = $v1
  26. if (%word ison $active) {
  27. if ($gettok(%mod^ncomp,3,8) != off) { %word = $ [ $+ [ $replace($ifmatch,<t>,%word) ] ] }
  28. if (%nickcomp2colores) %word = $+(%nc2cExtra,$regsubex(%word,/(.)/g,$iif(2 \\ \n,%nc2cColor1,%nc2cColor2)\t),%nc2cExtra,)
  29. %word = $+(,$gettok(%mod^ncomp,1,8),%word,$gettok(%mod^ncomp,2,8),,%colorDeLetra)
  30. }
  31. %mi^frase = %mi^frase %word
  32. inc %token
  33. }
  34. }
  35. }
  36. #mod^ncomp end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement