I think I'd recommend a hash table if you plan to add a lot of words. If it's only a few, then an the above works fine.... except that you'd probably want $1 in the alias instead of $1- if you're using single words.

A quick way (and it might work better combining it with regex...

Code:
on *:input:*: {
  if (!$ctrlenter && !$inpaste && $left($1,1) != $readini(mirc.ini,text,commandchar)) {
    CreateSpelling
    var %text = $1-, %t = $numtok($1-,32)
    while (%t) {
      var %text = $iif($hget(Spelling,$gettok(%text,%t,32)),$replace(%text,$gettok(%text,%t,32),$v1),%text)
      dec %t
    }
    msg $active %text
    halt
  }
}

alias CreateSpelling {
  if (!$hget(Spelling)) {
    hmake Spelling 10
    if ($exists(Spelling.hsh)) { hload Spelling Spelling.hsh }
  }
}

menu * {
  Spelling
  .Load Spelling:CreateSpelling
  .Add Word:hadd Spelling $$?="Enter misspelled word" $$?="Enter correct spelling"
  .Remove Word:hdel Spelling $$?="Enter the misspelled word you want to remove"
}


Note that you may also want to throw in some checks for punctuation as this won't match "dont" if it has punctuation next to it (e.g. "dont!"). This was just a quick thing I put together to give a general idea of how it works. It lets you add as many words as you want to with just a right click menu without editing the script at all.


Invision Support
#Invision on irc.irchighway.net