Mothers, as we all know, tend to pick on kids about their grammar. They're all ashamed, but that's not the point. This script simply adds a dot to the end of anything you say, as long as whatever you said doesn't already end in a dot, comma, question mark, or exclamation point. Thanks to Eugenio. I made it originally but just couldn't get it to work. He did something apparently irrelevant and made it work, so, kudos to him. It'll also halt if you begin with an exclamation point since it's assumed you're using a bot command when you do that.
alias doton { set %dot on | echo -a Dot script is now on. }
alias dotoff { unset %dot | echo -a Dot script is now off. }
on *:INPUT:*: {
if (%dot == on) {
if ($left($1,1) == /) { $1- | halt }
if ($left($1,1) == !) { msg $active $1- | halt }
if ($right($1-,1) == $chr(33)) { msg $active $1- | halt }
if ($right($1-,1) == $chr(46)) { msg $active $1- | halt }
if ($right($1-,1) == $chr(63)) { msg $active $1- | halt }
if ($right($1-,1) == $chr(44)) { msg $active $1- | halt }
haltdef
msg $active $1- $+ .
}
}
well instead of regex you can use tokens
alias dot { $iif($1 == on,set %dot on,$iif($1 == off,unset %dot)) | echo -a $iif(%dot,Dot script is now on.,Dot script is now off.) }
on *:INPUT:*: {
if (%dot) {
if ($istok(/ !,$left($1,1),32)) { $1- | halt }
if ($istok($chr(33) $chr(46) $chr(63) $chr(44),$right($1-,1),32)) { msg $active $1- | halt }
msg $active $1- $+ .
haltdef
}
}
I take it you labeled as follows:
Functionality:
Also, you said "no because that would need to match all of the text" exactly what does that mean? I thought we were just matching punctuations?