Ok, done this so far (should be enough to work, however you need to make the on *:text: stuff, aswell as some error checking)
Code:
alias kquote {
  ;Set what database to use, if not the default.
  var %db = quote. $+ $iif($prop,$prop,default), %dbfile = $^qt($scriptdir $+ %db $+ .dat)
  if (!$hget(%db)) {
    hmake %db 100
    if ($isfile(%dbfile)) {
      hload -b %db %dbfile
    }
    else {
      write -c %dbfile
    }
  }
  ;Check if its an identifier.
  if ($isid) {
    ;Check if $1 is 'add'
    if ($1 == add) {
      ;make sure all parameters are given
      if (($3 == $null) || ($numtok($2,32) > 1) || ($2 == $null)) {
        return $false
      }
      ;set key variables, such as the author, ID of the quote, etc.
      var %author = $2, %quote = $3-, %id = $calc($hget(%db,0).item + 1), %verify = $hget(%db,%id), %addtime = $ctime, %deleted = $false
      ;make sure we don't over write a quote
      while (%verify) {
        var %id = $calc(%id + 1), %verify = $hget(%db,%id)
      }
      ; add the quote
      hadd %db %id %addtime %deleted %author %quote
      hsave -b %db %dbfile
      ; check if it was added
      if ($hget(%db,%id) == %addtime %deleted %author %quote) {
        ;return the quote ID, and $true
        return $true %id
      }
      else {
        ;i'm not sure how this will happen, but its good to have 'just in case'
        return $false unexpected_error
      }
    }
    elseif ($1 == get) {
      ;Find out if there are any quotes in the database or not.
      if ($hget(%db,0).item == 0) {
        return $false empty
      }
      ; Get the quote, and check if it exists, is deleted, etc.
      var %quote = $iif($2 != $null,$2,$rand(1,$hget(%db,0).item)), %gquote = $hget(%db,%quote), %del = $gettok(%gquote,2,32)
      if (%gquote == $null) {
        return $false non-existant %quote
      }
      elseif (%del) {
        ; Quote has been deleted        
        return $false deleted %quote
      }
      else {
        ; Return the quote #, quote, author and creation time.
        return $true %quote $gettok(%gquote,1,32) $gettok(%gquote,3-,32)
      }
    }
    elseif ($1 == del) {
      ; Check if all parameters are given
      if ($2 == $null) {
        return $false
      }
      ; check if there are quotes in the database
      if ($hget(%db,0).item == 0) {
        ;return empty since there are no quotes in the database.
        return $false empty $2
      }
      ; Check if the quote exists
      var %quote = $2, %gquote = $hget(%db,%quote)
      if (%gquote == $null) {
        ;if the quote dosen't exist, return false
        return $false non-existant %quote
      }
      elseif ($gettok(%gquote,2,32) == $true) {
        ;check if its already deleted
        return $false already-deleted %quote
      }
      else {
        ;delete the quote...
        hadd %db %quote $gettok(%gquote,1,32) $true $gettok(%gquote,3-,32)
        ;return sucessfull
        return $true %quote
      }
    }
    elseif ($1 == version) {
      return $!kquote $+(v,$qver) by Kardafol @ Gamesurge [#Kardafol]
    }
  }
}
alias -l qver {
  return 0.4
}
alias -l ^qt {
  return $iif("*" iswm $$1-,$1-,$iif("* iswm $1-,$+($1-,"),$iif(*" iswm $1-,$+(",$1-),$+(",$1-,"))))
}


Documentation so far:

$kquote(add,author,quote)[.database]
This will add a quote to a database (default if [.database] isn't specified)
Returns: $true <id of added quote> for sucess, $false for failure (no quote and or no author given)
Valid examples: $kquote(add,Kardafol,<Kardafol> It lives!).#Test
$kquote(add,someguy,<someotherguy> quote)
Invalid examples: $kquote(add,someguy)
$kquote(add, ,<quote>).#chan


$kquote(get [,quote id])[.database]
This will get a quote from [.database], or from the default.

Returns: $true <id of quote> <time added (in $ctime format)> <author> <quote> Successfull get
$false non-existant <quote id> Quote dosen't exist.
$false deleted <quote id> Quote was deleted.
$false empty No quotes in the database

$kquote(del, [quote id])[.database]
This will delete a quote, though you can restore it (will add function to do that later, aswell as a function to view hidden quotes)

Returns: $true [quote id] Sucessfull deletion
$false already-deleted [quote id] Quote already deleted
$false non-existant [quote id] Quote dosen't exist
$false empty [quote id] database is empty.

I'll document it more when i get around to it, aswell as possibly add a search function, and add some more consistency to it.