matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Help - /commands!
js code: //Add to the top of the script
var strMessage = '';
var intTimer = 0;
js code: 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 'ir.message':
>>> strMessage = parameter;<<<
return "";
case 'ir.timer':
>>> intTimer = (typeof parseInt(parameter) === 'number' ? parseInt(parameter) : 0); <<<
return "";
}
}
}
This post was edited on 02-01-2009 at 05:53 PM by matty.
|
|