You can place regex directly in the matchtext parameter of an event by placing a $ before the level (in this case, *) -- This will prevent the script from trying to trigger when it shouldn't, and also help avoid conflicts with other on text events in the same file:
*on $:TEXT:/^!(go|leave)$/Si:#: {**