After a bit of work WDZ told me what I was doing wrong with my script (such a simple thing that I should have noticed myself
![:dodgy:](images/smilies/dodgy.gif)
). Anyway, here is my new version of the script code, add your email to the array (add more or take them away as you please).
code:
var emails = new Array("email@address.com","another@email.com","yet_another@emailaddy.com");//Add your email to this array
var re = /:(?:|[DOP()$@S]|-[#*])|\((?:[6e~#r*d&@lkfwz%]|co?|au?|[ima]p?|um?|x{1,2}|yn?|h5?|s[nto]?|pi?|tu?|[nb](?:ah)?|brb|\{\)\(\})\)|8(?:-|o)\||\^o\)|\+o\(/gi;
function OnEvent_ChatWndSendMessage(pChatWnd,sMessage){
for(i in emails){
if(Messenger.MyEmail == emails[i]){
return sMessage.replace(re,function($1){
Debug.Trace($1);
if($1.charAt(0) === ":"){
return $1.replace(/:-?/,"=");
}else if($1.charAt(0) === "("){
return $1.replace(/\(|\)|\*|&/g,function($1){
Debug.Trace($1);
switch($1){
case "(": return "{";
case ")": return "}";
case "*": return "*2";
case "&": return "dog";
}
});
}else{
switch($1){
case "8-|": return "8o)";
case "^o)": return "=/";
case "\+o(": return "=o(";
case "8o|": return "=o|";
}
}
});
}
}
}