PS: Note that such a script will actually _not_ prevent you from being added to a group conversation.
The thing this script does is as soon as you're added, it will present you with the choice to exit the group convo again or leave it. It can not and thus will not "decline" a group conversation as you're already in it.
So, although it might remove the annoyance of a new window opening, it will not remove the massive privacy issue involved in this.
The privacy issue at stake here is that whenever you are invited, and thus automatically added, to a group convo, everybody in the group convo can see your Windows Live Id. Even those who are not on your contact list and are complete strangers to you.
I would encourage everybody to
report this massive privacy issue so that there is something done to it...
-------------
Fix for roflmao456's otherwise nice short script:
code:
var max = 8; // Automatically block incoming multi-conversations if number of participants exceeds this number. 0 to disable.
var blockall = false; // Block all incoming multi-conversations.
function OnEvent_ChatWndCreated(ChatWnd){
if(ChatWnd.Contacts.Count < 2) return;
Debug.Trace("Multi-conversation detected.");
if((ChatWnd.Contacts.Count > max && max > 1) || blockall){
if(ChatWnd.Contacts.Count > max && max > 0){
Interop.Call('User32', 'PostMessageW', ChatWnd.Handle, 0x0111, 20001, 0x0000);
Debug.Trace("A multi-conversation was blocked. Reason: Exceeded variable max");
} else {
Debug.Trace("Building participant list...");
var participants = "";
for(var e = new Enumerator(ChatWnd.Contacts);!e.atEnd();e.moveNext()){
participants += "- " + MsgPlus.RemoveFormatCodes(e.item().Name) + " (" + e.item().Email + ")\n";
}
if(Interop.Call('User32', 'MessageBoxW', ChatWnd.Handle, 'An incoming multi-conversation was detected.\nList of participants:\n' + participants + 'Would you like to participate?', 'Multi Convo Blocker', 68) == 7){
Interop.Call('User32', 'PostMessageW', ChatWnd.Handle, 0x0111, 20001, 0x0000);
}
}
}
This does exactly the same thing. So, no need for the
blockall option. If you want to leave all group chats automatically, just set
max to 1.
('blockall' wasn't the best name for something like this though, since it doesn't block anything, it leaves the group chat, thus 'leaveall' or something?. see remark above.)