quote:
Originally posted by J-Thread
The split function returns an Array!! Try the code above.
Bah yeah you're right... good point
fixed, updated and now it works fine
quote:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
if(MessageKind == 1){
var CMD = Message.split(" ", 1).toString();
switch(CMD.toLowerCase()){
case "!date" : ChatWnd.SendMessage("The date is: (!D)"); break;
case "!time" : ChatWnd.SendMessage("The time is: (!T)"); break;
}
}
}