Uh, why not just:
on *:input:*:{ if (/* !iswm $left($1-,1)) { if ($strip(lol,$1-)) { msg $chan $replace($1-,ty,thank you) | haltdef } }