Shoutbox

[update] PlusPrivacy - 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: [update] PlusPrivacy (/showthread.php?tid=68145)

[update] PlusPrivacy by Plan-1130 on 11-07-2006 at 01:00 PM

Hi,

I've made this script because it was requested by a friend of mine:

Setting your status to Appear Offline will make you appear offline to all your contacts, while they can still talk to you.
PlusPrivacy can make you block all your contacts, except for a few you specify.
This way you will only appear online to a few contacts, in case you want to chat with just 1 (or more) contacts, and to nobody else.


For safety:
= Your original list is stored in the registry (user-dependant)
= On startup PlusPrivacy is restored (use /priv off to turn off PlusPrivacy)
= All settings are user-dependant
= When activated, it will be in total control and will block if you unblock, and vice versa, or store the new Exclusion

Bug fixes:
= Turning it off and (un)blocking contacts now fixed

code:
/priv on [contacts]
will turn on PlusPrivacy and, optionally, exclude the contacts (emails, seperated by a comma, no space or whatsoever)

/priv off
will turn PlusPrivacy off and restore to the original state, will also flush all variables.

/priv exclude <contacts>
will exclude the contacts from the blocklist (emails, seperated by a comma, no space or whatsoever)

/priv include <contacts>
will include the contacts in the blocklist (emails, seperated by a comma, no space or whatsoever)

/priv totalcontrol on
will restore all manual blocks and unblocks

/priv totalcontrol off
will saves all manual blocks and unblocks to the Exclusion list


RE: [release] PlusPrivacy by Plan-1130 on 11-08-2006 at 09:02 PM

Serious update: see first post...


RE: [update] PlusPrivacy by elektra on 11-08-2006 at 09:10 PM

seems like a good script, still testing it :P


RE: [update] PlusPrivacy by prashker on 11-08-2006 at 09:10 PM

Pretty cool....Trying now (y)


RE: [update] PlusPrivacy by CookieRevised on 11-08-2006 at 09:20 PM

! major security/privacy issue: do not store emails in the registry, use the userID instead... For the user's userID you use Messenger.MyUserId as you know, but to calculate the userID of a random given email address use:

code:
function userID(email) {
    email = email.toLowerCase();
    for(var x=0, i=0; i < email.length; i++) x = (x * 101 + email.charCodeAt(i)) % 4294967296;
    return x;
}


- /priv on command isn't reconized as a command...
- exclussion list (nor current list as-is) is not stored
- the script messed up my contact's block statusses (grrrr)
- /priv on command is faulty (especially first time use)
- /priv totalcontrol on/off seems inlogic (off should be on and vice versa; if totalcontrol is active it should save the current states, when it is turned off it should restore it; unless I misunderstand the purpose of 'totalcontrol' and in that case maybe another (not confussing) name for this should be made)

....

needs still a lot of work



RE: [update] PlusPrivacy by Plan-1130 on 11-09-2006 at 06:38 AM

quote:
Originally posted by CookieRevised
! major security/privacy issue: do not store emails in the registry, use the userID instead... For the user's userID you use Messenger.MyUserId as you know, but to calculate the userID of a random given email address use:
code:
    function userID(email) {
        email = email.toLowerCase();
        for(var x=0, i=0; i < email.length; i++) x = (x * 101 + email.charCodeAt( i)) % 4294967296;
        return x;
    }

Thanks, will change that, in other plugins too :)


- /priv on command isn't reconized as a command...
- exclussion list (nor current list as-is) is not stored
- the script messed up my contact's block statusses (grrrr)
- /priv on command is faulty (especially first time use)
Sorry for messing up your list :( These should have been fixed in the new version, if not I'll see what I can do (i used break; in a function, instead of return null;, which messed up :$)
- /priv totalcontrol on/off seems inlogic (off should be on and vice versa; if totalcontrol is active it should save the current states, when it is turned off it should restore it; unless I misunderstand the purpose of 'totalcontrol' and in that case maybe another (not confussing) name for this should be made)
if it is in total control, it should prevent you from blocking and unblocking manually, if turned off it will adapt itself to manual blocks and unblocks. I'm sorry the variable in the code itself uses a variable that suggests the other way round. (If you have a better suggestion for the configuration variable)
....

needs still a lot of work I know, but it was for a friend of mine and he gave me less than a day to complete it, but i did it in 2
code:
function OnEvent_Initialize(MessengerStart)
{
    if (!MessengerStart)
    {
        OnEvent_SigninReady(Messenger.MyEmail);
    }
}

function OnEvent_SigninReady(Email)
{
    for(var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext())
    {
        e.item().blocked = false;
        Debug.Trace(e.item().email + " has been unblocked.");
    }
}

will unblock all the contactwhen the script is started, for those with a messed up contact list (you'll have to manually block your flooding buddies)

And I will try to start using RegExp, I kind of know how to work with the syntax now, but the whole idea is a bit, confusing me...
if i use the split method for a string i can use regular expressions too, but should it be like String.split(/{2}[A-z]/) or something? (expression will match every 2 letters from A to Z and a to z) or do i have to use the RegExp object?
Or am I totally wrong with the split method?