If you want to know if a "?" or "!" or anything else is received, use the OnEvent_ChatWndReceiveMessage function.
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, Kind) {
if(Origin != Messenger.MyName && Message.match(/[?!]/)) {
//This will be triggered when the message came from someone else but you and contains a ? or ! character
}
}
I don't really understand what you mean with "stop to do something", so maybe you should explain what you're making and what you want it to do.