matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Help ME
js code: var objChatWnd = {};
function OnEvent_ChatWndSendMessage (pChatWnd, sMessage) {
var m;
if ((m = /^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage))) {
switch (m[1].toLowerCase()) {
case 'setuser' :
objChatWnd[pChatWnd.Handle] = m[2];
return '';
case 'do' :
return m[2]+' [['+objChatWnd[pChatWnd.Handle]+']]';
}
}
return sMessage;
}
function OnEvent_ChatWndDestroyed (pChatWnd) {
delete objChatWnd[pChatWnd.Handle];
}
function OnGetScriptCommands () {
return '<ScriptCommands>'+
'<Command><Name>setuser</Name><Description>Set\'s the users name for the chat window</Description>'+
'<Command><Name>do</Name><Description>Appends the name to the message</Description>'+
'</ScriptCommands>';
}
This post was edited on 05-05-2010 at 02:00 PM by matty.
|
|