Hi all, the following script is concerning the activation of auto timed messages in a channel by the bot. I'm trying to do it so that it can run in multiple channels and the timer name will be different for each channel as shown by the $chan part in the timer name and name of the variables. This script in its current form doesn't seem to spew out any of the text in the file that it is reading from.

It is activated by typing the command followed by a number so then the messages are displayed every so many minutes
i.e. if the user typed !autocom 2 The messages would display every 2 minutes...

Code:
on *:TEXT:!autocom *:#: {
  if ($2 == off) { return }
  var %TimeAuto $2 
  var %FinalTimeAuto $+ $chan = %TimeAuto * 60
  if ($nick == $remove($chan,$chr(35))) {
    msg # /me AutoCom: ON
    .timerNow $+ $chan 72 (%FinalTimeAuto $+ $chan) Linksall #
    return
  }
  else { msg # $nick -> You do not have permission to perform this action. }
}

alias Linksall { 
  var %chan $1
  var %lines $lines(linksall $+ $remove($chan,$chr(35)).txt)
  if (!%counter) || (%counter > %lines) set %counter 1
  var %msg $read(linksall $+ $remove($chan,$chr(35)).txt,%counter)
  msg %chan %msg
  inc %counter
}

Any ideas lads?