Shoutbox

Found an old script, need help getting it to work! - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Found an old script, need help getting it to work! (/showthread.php?tid=91064)

Found an old script, need help getting it to work! by bcapewell on 06-14-2009 at 10:33 PM

I found an old script that allows you to ignore somebody, the problem is, it's really unstable and once using the !unignore command, it will continue to ignore that person. I used to use stuffplug but since the 9.0 upgrade they haven't made a new version.

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 "";
        }
    }
}

If anyone could help me I'd be very grateful, thank you.
I have no experience with scripts (N)
RE: Found an old script, need help getting it to work! by SmokingCookie on 06-27-2009 at 09:48 PM

Why would it not work? Have you got some debugging info?

In the meantime, I've got something that may work. It it, however, untested code.