What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [release] Only Allowed Email can sign-in

Pages: (2): « First « 1 [ 2 ] Last »
[release] Only Allowed Email can sign-in
Author: Message:
Skyler0
Junior Member
**


Posts: 18
– / Male / –
Joined: Jun 2006
RE: [release] Only Allowed Email can sign-in
Simply change this line

code:
if(Email == "account1@live.com" || Email == "account2@hotmail.com")

to

code:
if(Email == "account1@live.com" || Email == "account2@hotmail.com" || Email ==  "account3@hotmail.com" || Email ==  "account 4@hotmail.com")

just add
code:
|| Email ==  "email@hotmail.com"
like I did above for every other email you want.

This post was edited on 06-26-2006 at 05:30 PM by Skyler0.
06-26-2006 05:29 PM
Profile E-Mail PM Find Quote Report
Apola Silverstone
Junior Member
**


Posts: 33
33 / Other / –
Joined: Jun 2006
RE: [release] Only Allowed Email can sign-in
it didn't work, just kicked me out
06-26-2006 05:35 PM
Profile E-Mail PM Find Quote Report
Arsenal
New Member
*


Posts: 1
Joined: Jun 2006
RE: [release] Only Allowed Email can sign-in
Or to shorten the script. You can just use an array like so..

function OnEvent_Signin(Email)
{
var emails = new Array("account1@live.com","account2@live.com","etc..")
for(i=0; i<emails.length; i++){
if(Email == emails[i])
{
var Message = "Hello :\n " + Messenger.MyName + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Allowed", Message,'notify.mp3');
}
else
{
var Message = "Access Denied " + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Not Allowed", Message,'notify.mp3');
Messenger.signout();
}
}
}


It should work. I havent tested it though.
06-26-2006 08:35 PM
Profile E-Mail PM Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
RE: RE: [release] Only Allowed Email can sign-in
quote:
Originally posted by Arsenal
Or to shorten the script. You can just use an array like so..

function OnEvent_Signin(Email)
{
var emails = new Array("account1@live.com","account2@live.com","etc..")
for(i=0; i<emails.length; i++){
if(Email == emails[i])
{
var Message = "Hello :\n " + Messenger.MyName + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Allowed", Message,'notify.mp3');
}
else
{
var Message = "Access Denied " + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Not Allowed", Message,'notify.mp3');
Messenger.signout();
}
}
}


It should work. I havent tested it though.


No that won't work. If your account is say "account1@live.com" then the first time through the loop it will approve you, but then it will go through the loop again, and your email address is not account2@live.com, and so it will not approve you and sign you out.

If your account is the last one in the array, I still don't think it would work, as you will have already been signed out in the previous iterations of the loop.

If you wanted to do it like this, I think the simplest way would be to have a separate function whichchecks if your email address is in the stored array. It should return true if your email address is found, or return false if it goes through the whole loop.

eg
code:

function checkAddress(Email)
{
    var emails = new Array("account1@live.com","account2@live.com","etc..")
    for(i=0; i<emails.length; i++){
        if(Email == emails[i])
        {
            return true;
        }


    }
    return false;
}


of course, I made the same mistake as you, and didn't test it....

This post was edited on 06-27-2006 at 02:10 AM by The Brain.
06-27-2006 02:09 AM
Profile PM Web Find Quote Report
Apola Silverstone
Junior Member
**


Posts: 33
33 / Other / –
Joined: Jun 2006
RE: [release] Only Allowed Email can sign-in
ok the script that works, and can have any amount of emails added is this

function OnEvent_Signin(Email)
{
if(Email == "email1@hotmail.com" || Email == "email2@hotmail.com" || Email ==  "email3@hotmail.com" || Email ==  "email4@hotmail.com" || Email ==  "email5@hotmail.com" || Email ==  "email6@hotmail.com")
{
var Message = "Welcome " + Messenger.MyName + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Access Granted", Message,'notify.mp3');
}
else
{
var Message = "Access Denied" + "!" + "Bye-Bye " + Messenger.MyName + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Bouncer Bot Activated", Message,'notify.mp3');
Messenger.signout();
}
}


and then if you want to addmore people, just copy and paste { || Email == "email2@hotmail.com"} into the end of the line if(Email == "email1@hotmail.com" || Email == "email2@hotmail.com" || Email ==  "email3@hotmail.com" || Email ==  "email4@hotmail.com" || Email ==  "email5@hotmail.com" || Email ==  "email6@hotmail.com"<right here>)

this works for certain, tested many times

This post was edited on 06-27-2006 at 02:20 AM by Apola Silverstone.
06-27-2006 02:12 AM
Profile E-Mail PM Find Quote Report
zaui
New Member
*

Avatar
IaMMaI

Posts: 4
– / Male / –
Joined: Jun 2006
O.P. RE: [release] Only Allowed Email can sign-in
download .plsc HERE

code:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Signin(Email)
{     
    var Email_1 = "disable@disable.com"; // change to your Email
    var Email_2 = "";
    var Email_3 = "";
    var Email_4 = "";
    var Email_5 = "";

    if(Email_1 != "disable@disable.com")
    {
        if(Email == Email_1 || Email == Email_2 || Email == Email_3 || Email == Email_4 || Email == Email_5) //Change to your Emai
         {
         var Message = "Hello : " + Messenger.MyName + "!\nMy Email Only [Script By Z-Aui]";
        Message = MsgPlus.RemoveFormatCodes(Message);
         MsgPlus.DisplayToast("My Email Only", Message,'notify.mp3');
         }
   
         else
        {
        var Message = "Access Denied! \nWith My Email Only \n[Script By Z-Aui]" ;
        Message = MsgPlus.RemoveFormatCodes(Message);
         MsgPlus.DisplayToast("My Email Only", Message,'notify.mp3');
         Messenger.signout();
         }
    }
     else
    {
    var Message = "My Email Only Is Disable. \nUse Script Editor to Enable. " + "!";
    Message = MsgPlus.RemoveFormatCodes(Message);
     MsgPlus.DisplayToast("My Email Only", Message,'notify.mp3');
     }
   
}

06-29-2006 04:50 PM
Profile PM Web Find Quote Report
Thor
Veteran Member
*****

Avatar
Awwwwwwww.

Posts: 1118
Reputation: 42
31 / – / Flag
Joined: May 2006
RE: [release] Only Allowed Email can sign-in
Simple script :)

Like it
(Y)
:plus4: Translation guidelines for Messenger Plus! Live
I'm no longer around this town, but I miss the community dearly. You can always find me lurking in #banana, or at
nitrolinken.net.
06-29-2006 05:18 PM
Profile PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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