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

on *:start: {
  CreateHelp
}

on *:text:*:#: {
  if ($1 != !learn && $1 != !replace && $1 != !append && $1 != !delete && $1 != !whoset && $1 != !listall && $1 != !last && $1 != $chr(63)) { return }
  if ($hget(Help) == $null) { CreateHelp }
  if ($1 == !listall) {
    var %list.cnt = 1
    var %line.cnt = 1
    while (%list.cnt <= $hget(Help,0).item) {
      if ($len(%list [ $+ [ %line.cnt ] ]) > 300) { inc %line.cnt }
      var %list. $+ %line.cnt = %list [ $+ [ %line.cnt ] ] $+ , $+ $hget(Help,%list.cnt).item
      inc %list.cnt
    }
    var %list.cnt = 1
    while (%list.cnt <= %line.cnt) {
      msg $chan $right(%list [ $+ [ %line.cnt ] ],-1)
    }
    return
  }
  if (!$2) { msg $chan Please include a keyword with the command | return }
  if ($1 == !learn) {
    if ($hget(Help,$2)) { msg $chan That keyword is already used.  Please choose another, or use !replace or !append. | return }
    msg $chan Learned $3-
    hadd Help $2 $nick $3-
  }
  elseif ($1 == $chr(63)) {
    var %data = $gettok($hget(Help,$2),2-,32)
    if (%data == $null) { msg $chan No help available on that item. }
    else {
      msg $chan %data
    }
  }
  elseif ($1 == !replace) {
    if ($hget(Help,$2)) {
      msg $chan Replaced $gettok($hget(Help,$2),2-,32) with $2-
      hadd Help $2 $nick $3-
    }
    else msg $chan No such keyword ( $+ $2 $+ ).
  }
  elseif ($1 == !append) {
    if ($hget(Help,$2)) {
      msg $chan Appended $3- to $hget(Help,$2)
      hadd Help $2 $nick $gettok($hget(Help,$2),2-,32) $3-
    }
    else msg $chan No such keyword ( $+ $2 $+ ).
  }
  elseif ($1 == !delete) {
    if ($hget(Help,$2)) {
      msg $chan Deleted $2 -- $gettok($hget(Help,$2),2-,32)
      hdel Help $2
    }
    else msg $chan No such keyword ( $+ $2 $+ ).
  }
  elseif ($1 == !whoset) {
    if ($hget(Help,$2)) {
      msg $chan $gettok($hget(Help,$2),1,32) was the last person to update $2 $+ .
    }
    else msg $chan No such keyword ( $+ $2 $+ ).
  }
  elseif ($1 == !last) {
    if ($2 !isnum) { msg $chan You need to enter a number with that command. | return }
    var %list.cnt = $calc($hget(Help,0).item - $2)
    if (%list.cnt < 1) { var %list.cnt = 1 }
    var %line.cnt = 1
    while (%list.cnt <= $hget(Help,0).item) {
      if ($len(%list [ $+ [ %line.cnt ] ]) > 300) { inc %line.cnt }
      var %list. $+ %line.cnt = %list [ $+ [ %line.cnt ] ] $+ , $+ $hget(Help,%list.cnt).item
      inc %list.cnt
    }
    var %list.cnt = 1
    while (%list.cnt <= %line.cnt) {
      msg $chan $right(%list [ $+ [ %line.cnt ] ],-1)
      inc %list.cnt
    }
  }
  hsave Help Help.hsh
}


USE:
!learn keyword description
!replace keyword new_description
!append keyword new_part_of_description
!delete keyword
!whoset keyword
!listall
!last number
? keyword


Ok, I didn't test this, but it should work. If not, let me know. You may want to adjust the 300's for each of those commands to something higher or lower. That's the *approximate* number of characters you want per line when listing all of your commands. What will happen is that it will display about that many characters' worth of keywords, then go to the next line and keep doing more lines until it reaches the end of the keywords. Keep in mind that if you have enough keywords to send more than 5 or so lines, you'll get flooded off. This is done so you don't try displaying more characters than the network allows on a single line and also prevents you from making the variable length too long.


Invision Support
#Invision on irc.irchighway.net