You can use OnEvent_ChatWndSendMessage only once... so
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if (Message.substr(0, 3)== "bye"){
return'/signout'
}
if (Message.substr(0, 4) == "away"){
return'/away'
}
if (Message.substr(0, 4) == "back"){
return'online'
}
}
should work.
Also message.substr was used in the wrong way