Code:
on $*:TEXT:/^[!](q(uote)?)/Si:#:{
  if !%flood {
    inc -u5 %flood
    if ($2) {
      if ($2 !isnum) { msg $chan 07 $+ $2 14isn't a number. | halt }
      if ($2 isnum) {
        if ($read(Quotes.txt,$2)) {
          msg $chan 14S07elected 14Q07uote14(07 $+ $2 $+ 14/07 $+ $lines(Quotes.txt) $+ 14): $read(Quotes.txt,$2)
        }
        else {
          msg $chan 14No quote on line07 $2 $+ 14.
        }
      }
    }
    else {
      var %x $rand(1,$lines(Quotes.txt))
      msg $chan 14R07andom 14Q07uote14(07 $+ %x $+ 14): $read(Quotes.txt,%x)
    }
  }
}

Last edited by DeSync; 24/12/10 01:33 PM.