well, some of the guys that I know just love typing in a "proper" way,
so they would type with the first capital letter and the full-stop at the end,
and so I thought it would be interesting to make life easier :P
#cl on
on *:input:#: {
if ($left($1,1) == /) { return }
if ($istok(? ! .,$right($1-,1),32)) { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) }
else { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) $+ $chr(46) }
}
#cl end
menu * {
.CLP [capital letter - point]
..on:enable #cl
..off:disable #cl
}
It's a nifty script to automatically capitalize the first word of a sentence and insert a period at the end. But it would be better if it could recognize a question phrase and put a question mark at the end, instead of a period.
Let's say if you typed a simple word why and didn't put a question mark, the script would put a period there, which would not be a good thing.
What, do, did, how, why, where, when, who, can, could, should and might are the common ones to start a question phrase. They are the words to watch out for. This also applies to the exclamation mark.
elseif (? isin $1-) { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) }
Above does not add a period to the end and it allows the questionmark to be anywhere in the sentence(s).
else { haltdef | msg $chan $upper($left($1,1)) $+ $right($1-,-1) $+ $chr(46) }
Above allows you to have double period at the end ( .. ) or an exclimation point and then a period ( !. )
Is there a way to bypass it without deleting the other scripts?