Shoutbox

My auto-block script messes up [MsgPlus bug?] - 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: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: My auto-block script messes up [MsgPlus bug?] (/showthread.php?tid=76559)

My auto-block script messes up [MsgPlus bug?] by kam1kaz3 on 08-05-2007 at 02:09 PM

Hi,

I was creating a script with the purpose of auto-blocking any contacts that go offline, and unblock them when they come online.

I created this script successfully, tested it, and it works, but after some time things start to get messed up, people appearing offline when in fact they are online and vice-versa. (re-logging will make things go back to normal)

Also, I noticed that some sign in/sign out events are not happening (and not even showing in the MsgPlus! Event Listing window), therefore unsynchronizing my script with the actual state of messenger.

Another thing I noticed, is that when a contact is unblocked at start, and then blocked with a script, if after that you right-click the contact, the option "unblock contact" isn't there, instead there's a "block contact" option, and only after you click it, the "ublock contact" will appear :S (edit: this only happens sometimes though... couldn't find a way to reproduce this yet)

Is it me doing something wrong or is this actually a bug in MsgPlus?

Thank you for your time.


More info:
MSN version: 8.1.0178.00
Plus! Version: 4.23.0.276
OS: Windows XP Pro

I block/unblock contacts using the Contact::Blocked property.


RE: My auto-block script messes up [MsgPlus bug?] by matty on 08-05-2007 at 03:30 PM

code:
/*
*
*    This code is only ment as an example to the script.
*    It should not be used as it doesn't implement any failsafes for instance
*    if the user was already previously blocked you do not want to unblock them.
*
*/


function OnEvent_Initialize(MessengerStart){
    for (var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext()){
        if (e.item().Status === 1) e.item().Blocked = true;
    }
}

function OnEvent_ContactSignOut(sEmail) {
    Messenger.MyContacts.GetContact(sEmail).Blocked = true;
}

function OnEvent_ContactSignIn(sEmail) {
    Messenger.MyContacts.GetContact(sEmail).Blocked = false;
}


I just tried it here and everything worked fine including the Right Click menu displaying the proper Block/Unblock string.
RE: My auto-block script messes up [MsgPlus bug?] by kam1kaz3 on 08-05-2007 at 04:16 PM

Thank you for yout reply.

I'm sorry, my mistake in writing, that specific bug only happens sometimes, I've been unable to find a way to reproduce the bug, but it happened twice in the two 24-hours-online test I did.

Please keep that script running for as long as you can and you'll see that eventually you'll start to have online contacts blocked, and offline contacts unblocked. And some of them will have the bug I mentioned about the right-clicking thing.

Please excuse my english errors :S

[edit] I can upload my script if you want, but it doesn't differ much from yours appart from keeping the wanted contacts blocked.
(I know the error doesn't come from here because I have Debug.Traces in the important places, and checking the Plus! event window also shows that some events simply weren't "intercepted" my plus!)
Still I will try to make the script as simple as yours just to make sure I'm not failing somewhere.


RE: My auto-block script messes up [MsgPlus bug?] by matty on 08-05-2007 at 04:28 PM

Well here is the weirdest things, after a bit of time the menu thing happened. However when I clicked the Unblock item Messenger Crashed.

Some still had Block Contact as items and if I pressed that I could press Unblock afterwards.

Windows XP Service Pack 2 (5.1.2600)
Windows Live Messenger 8.5.0517
Messenger Plus! Live 4.23.0.276


RE: RE: My auto-block script messes up [MsgPlus bug?] by kam1kaz3 on 08-05-2007 at 04:33 PM

quote:
Originally posted by matty
Well here is the weirdest things, after a bit of time the menu thing happened. However when I clicked the Unblock item Messenger Crashed.

Some still had Block Contact as items and if I pressed that I could press Unblock afterwards.

Windows XP Service Pack 2 (5.1.2600)
Windows Live Messenger 8.5.0517
Messenger Plus! Live 4.23.0.276


Exacly! However my Messenger never did actually crash.

Thank you very much for confirming this issue :)
RE: My auto-block script messes up [MsgPlus bug?] by kam1kaz3 on 08-06-2007 at 12:48 PM

Ok, so, after leaving the script running again this night, something weird happened again...

When I woke up, I had someone talking to me on MSN, so when I was  writing my reply, this contact gets blocked, and it was still online. I checked Plus! event listing and to my surprise, a bunch of contacts (about 10 or more) were blocked at the same time for no reason at all (no events ocurred).

Just thought I should share this bit of info here.