on 1:open:?: { set %ign $addtok($nick,%ign,32) | ven }
alias ven { set %ip $address($nick,4) set %i 1 :da .echo -a 0,4Privado $nick %ip $chr(91) Canales $chr(93) $comchan($me,%i) inc %i if %i > 10 { halt } goto da } }
Additionally, the format of your $addtok is slightly incorrect, and the goto format for looping is generally considered to be one of the worst. I don't even know why Khaled has it.
Here's a suggested re-write.
Code:
on *:open:?:*:{ ven $nick }
alias ven {
set %ign $addtok(%ign,$1,32)
var %i = 1
while %i <= $iif($comchan($1,0) < 10,$v1,$v2) {
.echo -a 0,4Privado $1 $address($1,4) $chr(91) Canales $chr(93) $comchan($1,%i)
inc %i
}
}
P.S.: Please use the Code Tags button (looks like the # character) when posting code.