It would work but you can only have one function with a specified name, so you have to put all options together, like this:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if (Message.substr(0, 6) == "bye"){
return'/signout'
}else if (Message.substr(0, 6) == "away"){
return'/away'
} else if (Message.substr(0, 6) == "back"){
return '/online'
}
}
Edit: Beaten by Felu