I'm trying to make a quote system work, and the only commands that don't are the !delquote # and !clearquotes commands. Everything else appears to be working as expected. Any ideas as to why? I copied this code from a friend and plugged my channel into it.

Code:
on *:LOAD:{ guser owner $$?"Enter the bot's owner" }
on $*:TEXT:/^[!](quote?)/Si:#marcusraven86:{
  if ((%floodjquote) || ($($+(%,floodjquote.,$nick),2))) { return }
  set -u120 %floodjquote On
  set -u120 %floodjquote. $+ $nick On
  if ($2) {
    if ($2 !isnum) { msg $chan /me > $+ $2 isn't a number. | halt }
    if ($2 isnum) {
      if ($read(Quotes.txt,$2)) {
        msg $chan /me > Quote #$2 - $read(Quotes.txt,$2)
      }
      else {
        msg $chan /me > No quote on line $2 $+
      }
    }
  }
  else {
    var %x $rand(1,$lines(Quotes.txt))
    msg $chan /me > Quote #( $+ %x $+ ) - $read(Quotes.txt,%x)
  }
}
on $*:TEXT:/^[!](t(otal)?quotes)$/Si:#marcusraven86:{ msg $chan /me > Total Quotes: $lines(Quotes.txt) }
on $*:TEXT:/^[!](s(earch)?quotes)/Si:#marcusraven86:{
  if (!$2) {
    msg $chan /me > Enter a search term!
  }
  else {
    msg $chan /me > Searching through quotes for $2 $+ ...
    var %search
    var %x 1
    while ($read(Quotes.txt,%x)) {
      if ($2 isin $read(Quotes.txt,%x)) { var %search $addtok(%search,%x,32) }
      inc %x
    }
    if (!%search) { .timer 1 2 msg $chan /me > No quotes found matchng $2 $+  }
    else { .timer 1 2 msg $chan /me > Found quotes matching $2 $+ : %search }
  }
}
on $*:TEXT:/^[!](l(ast)?quote)$/Si:#marcusraven86:{ msg $chan /me > Last Quote( $+ $lines(Quotes.txt) $+ ): $read(Quotes.txt,$lines(Quotes.txt)) }
on $*:TEXT:/^[!](a(dd)?quote)/Si:#marcusraven86:{
  if (!$2) { msg $iif($chan,$chan,$nick) /me > Enter a quote to add! }
  else {
    if ($nick isop #) {
      write Quotes.txt $2-
      msg $iif($chan,$chan,$nick) /me > Added quote - $2- $+
    }
  }
}
on $owner:TEXT:/^[!](d(el)?quote)/Si:#marcusraven86:{
  if (!$2) { msg $iif($chan,$chan,$nick) Enter a quote number to delete! }
  else {
    if ($2 isnum) {
      msg $iif($chan,$chan,$nick) /me > Deleted $2 from quotes.
      write -dl $+ $2 Quotes.txt
    }
    else { msg $nick /me > $2 is not a number }
  }
}
 
on $owner:TEXT:/^[!](c(lear)?quotes$/Si:#marcusraven86:{
  msg $iif($chan,$chan,$nick) /me > Cleared all $lines(Quotes.txt) quotes.
  write -c Quotes.txt
}