What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Block/unblock in a multiple conversation?

Block/unblock in a multiple conversation?
Author: Message:
Robin4286
Junior Member
**


Posts: 21
Joined: Sep 2006
O.P. Block/unblock in a multiple conversation?
Okay, so what I want to do is just to block all contacts in a conversation, but just that conversation. I also want to be able to unblock them as well. I dont wish promptts to constantly appear, because the conversation will have 3+people in it. Is there a way you can block/unblock them?

I tried sending /block, but that just makes a prompt appear when there are multiple people.

Can anyone help?
Thanks in advance!
09-22-2006 11:23 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Block/unblock in a multiple conversation?
@Chris4: POST DELETED ;)

@Robin4286: It is possible to block all the people in a group chat. It just requires iterating through the contacts in the current chat window. You should be able to block/unblock them easily enough. However, you may run into an error if there is a contact in the conversation that is not in your own contact list. This should be pretty simple to get around though :p

EDIT: I'll knock something up quickly and post it here when I'm done

This post was edited on 09-22-2006 at 11:54 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-22-2006 11:50 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Block/unblock in a multiple conversation?
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
    if (sMessage == '/mblock'){
        for(var enumerator = new Enumerator(pChatWnd.Contacts) ; !enumerator.atEnd(); enumerator.moveNext()){
            enumerator.item().Blocked = true;
        }
        return '';
    }
    else if (sMessage == '/munblock'){
        for(var enumerator = new Enumerator(pChatWnd.Contacts) ; !enumerator.atEnd(); enumerator.moveNext()){
            enumerator.item().Blocked = false;
        }
        return '';
    }
}

This post was edited on 09-23-2006 at 01:08 AM by matty.
09-23-2006 01:07 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Block/unblock in a multiple conversation?
quote:
Originally posted by SpunkyLoveMuff
However, you may run into an error if there is a contact in the conversation that is not in your own contact list.
it shouldn't though, as you can put people on your block list without them being on your contact list.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-23-2006 01:24 AM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Block/unblock in a multiple conversation?
quote:
Originally posted by CookieRevised
it shouldn't though, as you can put people on your block list without them being on your contact list.

I have noticed problems before trying to read properties (and therefore set properties?) with contacts notsaved on my own list. I guess I was beaten to the code... I kinda went to bed and was planning to do it now... :p
<Eljay> "Problems encountered: shit blew up" :zippy:
09-23-2006 10:42 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On