| 
O.P.  /command problem!
 function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) { 
    if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) { 
        var command = RegExp.$1.toLowerCase(); 
        var parameter = RegExp.$2; 
        switch (command) { 
case 'donothing': 
                // <- Lets tell the function we handled the command. But nothing needs to e passed back to the conversation; keep the command showing. 
                ChatWnd.SendMessage("DDDDOOOHHH"); 
                Debug.Trace("command reconized: " + command + ", parameter: " + parameter); 
                return "LOL!"; 
        } 
    } 
} 
 
Why cant i do that ? 
And how can i do it otherwise? 
 |