I didn't think that was what you were after or else I would have posted an even better script for you.
code:
var list = Array();
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
for (i=0; i<list.length;i++)
{
if (Origin === Messenger.MyContacts.GetContact(list[i]).Name)
{
ChatWnd.SendMessage("/close")
}
else
{
return Message;
}
}
}
function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
if (Message === "!ignore")
{
var ChatWndContacts = ChatWnd.Contacts;
if(ChatWndContacts.Count == 1)
{
var e = new Enumerator(ChatWndContacts);
var Contact = e.item();
list[list.length] = Contact.Email
}
return "";
ChatWnd.SendMessage("/close")
}
else if (Message === "!unignore")
{
var ChatWndContacts = ChatWnd.Contacts;
if(ChatWndContacts.Count == 1)
{
var e = new Enumerator(ChatWndContacts);
var Contact = e.item();
for (i=0;i<list.length;i++)
{
if(Contact.Name === list[i])
{
list[i] = "";
}
}
return "";
}
}
}
I'm sorry I don't know how to stop the pop-ups either. The commands are "!ignore" and "!unignore". I hope you like it.
EDIT: Changed it with te advice of Mattike (I missed a ")"
)