quote:
Originally posted by Mnjul
quote:
Originally posted by drizzdk
ChatWnd.SendMessage("DDDDOOOHHH");
Shouldn't that be oChatWnd?
code:
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) != null) {
var command = RegExp.$1.toLowerCase();
var parameter = RegExp.$2;
oChatWnd.SendMessage("DDDDOOOHHH");
Debug.Trace("command reconized: " + command + ", parameter: " + parameter);
return "LOL!";
}
}
Your code had some errors in it. !== should be !=, ChatWnd should be oChatWnd, otherwise it works fine.