code:
function OnEvent_ChatWndSendMessage(ChatWnd,str){
if (str.charAt(0) == '/'){
if(str.charAt(1) == '/'){
return str;
}else{
var firstSpace = str.search(' ');
if(firstSpace == -1){
var command = str.toLowerCase().substr(1);
var params = '';
}else{
var command = str.toLowerCase().substr(1, firstSpace-1);
var params = str.substr(firstSpace+1);
}
if(params != "") { Debug.Trace("The command \"" + command + "\" with the parameters \"" + params + "\" has been parsed."); }
else { Debug.Trace("The command \"" + command + "\" has been parsed."); }
WSH = new ActiveXObject("WScript.Shell")
switch(command) {
case 'xreverse':
var reverse = ""
var length = str.length+1;
for(i=1;i<length+1;i++){
reverse += str.charAt(length-i);
}
str = reverse;
break;
default:
}
}
return str;
}
function OnGetScriptCommands()
{
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>xreverse</Name>';
commands+='<Description>'+"Reverse your message"+'</Description>';
commands+='<Parameters>Message</Parameters>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
This script should work for just the purpose you want it to. I was too lazy to package it sorry.