I have a small problem with this code, anyone that can spot it? the problem is that when i loop true the file, then it do 'join %chan'. How ever it join the channel two times 'if the channels is +k and you dont have the key you see it', any idea on how to solve this?
Code:
alias test {
  var %x 0
  var %xx $lines(" $+ $mircdiraj\ $+ %tnwork $+ .txt $+ ")
  :loop
  var %chan = $read($mircdiraj\ $+ %tnwork $+ .txt,nt,%x)
  inc %x
  join %chan
  if (%x <= %xx) { goto loop }
  else {
    return
  }
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }