I have no idea how that works from just looking at it.

I made something real quick for you instead:
Code:
on *:text:!quote*:#: $mid($1-,2-)
alias quote {
  if ($1 == add) { 
    if ($nick !isop #) return
    var %n $ini(quotes.ini,#,0)
    inc %n 
    writeini quotes.ini # %n $2-
    msg # Quote $chr(35) $+ %n added. Use !quote $chr(35) $+ %n $+ .
  }
  else {
    var %1 $iif($left($1,1) == $chr(35),$mid($1,2-),$1)
    if (%1 !isnum) { 
      if (%1 == random) {
        var %n $ini(quotes.ini,#,0)
        var %rng $rand(1,%n)
        msg # Quote $chr(35) $+ %rng $+ : $readini(quotes.ini,n,#,%rng)
      }
      else { 
        var %n $ini(quotes.ini,#,0)
        var %i 1
        while (%i <= %n) {
          var %read $readini(quotes.ini,n,#,%i)
          if ($1- isin %read) msg # Quote $chr(35) $+ %i $+ : $v2
          inc %i
        }
      }
    }
    elseif (%1 isnum) { 
      msg # Quote $chr(35) $+ %1 $+ : $readini(quotes.ini,n,#,%1)
    }
  }
}
Tested and working. Not tested extensively however.

Syntax is:
!quote add Text of your choice > Adds quote
!quote random > Returns a random quote
!quote (#1|1) > Returns the first quote.
!quote Text of > Returns any matches.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net