Please refer to CookieRevised's reply to [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin as this give proper code.
The rest of this post has been kept for understanding the flow of the thread, the code in it has some flaws and is recommended not to be used, sorry.
A note to script developers:
Because of the StuffPlug Chat Only names feature you will have to use a different method when checking the origin of a received message.
Instead of using:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){//When a message is recieved in a chat window
if(Origin !== Messenger.MyName){//If the sender's name is not my name
//Do stuff here
}
//Do more here if you like
}
You should use the following code:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){//When a message is recieved in a chat window
var WSH = new ActiveXObject("WScript.Shell");
try{
var enabled = WSH.RegRead("HKLM\\SOFTWARE\\iAvatars.com\\StuffPlug\\"+Messenger.MyUserId+"\\ChatName");//check id a StuffPlug Registry for Chat Only names exists
if(enabled === 1){//Check if Chat Only names are enabled
try{
var nick = WSH.RegRead("HKLM\\SOFTWARE\\iAvatars.com\\StuffPlug\\"+Messenger.MyUserId+"\\szChatName");//Test for what the Chat Only name currently is
}catch(e){//if there is no registry for the Chat Only name
var nick = Messenger.MyName;
}
}else{//if Chat Only names are _NOT_ enabled
var nick = Messenger.MyName;
}
}catch(e){//if there is no registry for if Chat Only names (ie. StuffPlug is not installed)
var nick = Messenger.MyName;
}
if(Origin !== nick){//If the sender's name is not my name
//Do stuff here
}
//Do more here if you like
}
I do realise this is a little more complex to do, but it will fix this problem that may be effecting your scripts.
Thanks Cookie and deAd for informing me about my mistakes