menu menubar {
Word Changer $group(#wordchanger) :{
$iif($group(#wordchanger).status == on,.disable #wordchanger,enable #wordchanger)
echo -a Word Changer is now $group(#wordchanger).status
}
}
#wordchanger off
on *:input:#channel:{
unset %newword
if (($left($1,1) isin / $readini($mircini,text,commandchar)) || ($left($$1,1) == !) || ($left($$1,1) == @) || ($ctrlenter == $true)) { return }
var %i = 1
var %words = $$1-
var %wordcount = $gettok(%words,0,32)
while (%i <= %wordcount) {
var %newstring = $read(textreplace.txt,s,$gettok(%words,%i,32))
if (%newstring == $null) { %newword = %newword $gettok(%words,%i,32) }
if (%newstring != $null) { %newword = %newword %newstring }
inc %i
}
say %newword
halt
}
#wordchanger end