Try using this code maybe is that you want:

Code:
ON !*:TEXT:!commands:#: {
  var %f = commands.txt
  if (!$isfile(%f)) { msg $chan [ $+ $nick $+ ]: There is NOT any command available since now, file is NOT exist! | return }
  if (!$lines(%f)) { msg $chan [ $+ $nick $+ ]: There is NOT any command avaialable since now, file is EMPTY! | return }
  msg $chan [ $+ $nick $+ ]: Starting now the list with all the commands that are available on the channel, Please wait...
  var %t = $lines(%f)
  var %i = 1
  while (%i <= %t) {
    var %r = $read(%f,nt,%i)
    var %g = $gettok(%r,1,32)
    var %com = $addtok(%com,%g,32)
    inc %i
  }
  if (%com) { msg $chan [ $+ $nick $+ ]: All the available commands are:  $+ %com $+  }
  elseif (!%com) { msg $chan [ $+ $nick $+ ]: There is NOT any command available on the file! | return }
  msg $chan [ $+ $nick $+ ]: End of command list. - (Total Commands:  $+ $numtok(%com,32) $+ )
}


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-