The fastest method would probably be hash tables:

Code:
alias -l CreateHelp {
  hmake Help 100
  if ($isfile(Help.hsh)) { hload Help Help.hsh }
}

on *:start: {
  CreateHelp
}

on *:text:*:#: {
  if ($1 == !learn) {
    if ($hget(Help) == $null) { CreateHelp }
    hadd Help $2-
    hsave Help Help.hsh
  }
  elseif ($1 == $chr(63)) {
    var %data = $hget(Help,test)
    if (%data == $null) { msg $chan No help available on that item. }
    else {
      msg $chan %data
    }
  }
}


Ok, this is not tested, but should work fine. If not, let me know and I'll see what is going on with it. It will be very fast and easy to use. As you asked, here are the uses of it:

!learn keyword description

? keyword

If you want it to respond to !help or something instead of ?, then replace $chr(63) in the script with !help or whatever you're going to use. I used ? since that was what you said the bot used.

Keep in mind that I did this for one-word keywords because that's what you were giving as an example. If you want multiple-word keywords, let me know and I can easily edit it.


Invision Support
#Invision on irc.irchighway.net