hi
see /help $v1 no need for "halt" no need to unset the variable is not global and $str($chr(32),2) dont work must be with 160 $str($chr(160),2) finaly your code can be like this take an idea if you need
on *:text:*:#:{
if $strip($1) == !tldscan {
if $2 {
if $left($2,1) == $chr(35) {
if ($me ison $2) var %chan $2
else msg # I'm not on $+($2,.)
}
else msg # Invalid channelname.
}
else var %chan #
if %chan {
var %x 1
while $nick(%chan,%x) {
var %a $gettok($address($v1,2),-1,46)
if $read($qt($scriptdirdata\tld.txt),s,%a) {
inc $+(%,tld.,%a)
var %tld.found $addtok(%tld.found,$(%a,2),46)
}
inc %x
}
%x = 1
while ($gettok(%tld.found,%x,46)) var %tld.output $+(%tld.output,$v1,:,$chr(32),$($+(%,tld.,$v1),2),$chr(44),$str($chr(160),2)),%x %x + 1
msg # TLDscan for %chan complete: $+($iif(%tld.output,$left($v1,-3),No Result),.)
}
}
elseif ($strip($1) == !tld) if ($read($qt($scriptdirdata\tld.txt),s,$2)) msg # $v1
}