I made it more readable/fixed your syntax issues (you had a few missing { }'s and stuff), I didn't work on anything else.

Code:
on 1:TEXT:*:#: {
  if ($1== @quote) {
    if ($2 == $null) { msg $chan $read(quote.txt, $2) }
    if ($2 isin $read(quote.txt, $2)) { msg $chan $read(quote.txt, $2) }
  }
  if ($1 == @addquote) { write quote.txt $2 | msg $chan [Quote Added] }
  if ($1 == @quotenum) { msg $chan There are $lines(quote.txt) stored }
}


ALWAYS use the n switch with $readini() and $read() !!! Bad things will happen without it.
/help $read

http://www.zigwap.com/mirc/clueless

http://www.msldev.com/