Nice effort you've put into this script. As for the regex part, you could do:
on $*:text:/^[!@`~](tsinfo|users|channels|ts_start)$/Si:#: {
var %e = $iif($sock(ts3),sockwrite -n ts3 serverlist,msg $chan $msg_style(Error) Not Connected)
if ($regml(1) == tsinfo) { %e }
else if ($regml(1) == users) { %e }
else if ($regml(1) == channels) { %e }
else { ts }
}
You already specified the three matches, the last one has to be ts_start. So there was no need for another elseif statement but an else condition. Also, make sure your regex starts with the command symbols and ends exactly as the matched trigger strings.