quote:
Originally posted by ultimatebuster
js code:
var CONTACTS = "johnsmith@hotmail.com, abcdefg@hotmail.com";
function OnEvent_Signin(Email){
if (CONTACTS.indexOf(Email) != -1){
if (!Messenger.MyContacts.GetContact(Email).Blocked) {
Messenger.OpenChat(Email).SendMessage('Hi!);
}
}
}
If you want to check multiple contacts, you would be better off with an array.
js code:
var Contacts = ["johnsmith@hotmail.com", "abcdefg@hotmail.com"];
function OnEvent_Signin(Email)
{
for (var X in Contacts)
{
if (Contacts[X] === Email)
{
if (!Messenger.MyContacts.GetContact(Email).Blocked)
{
Messenger.OpenChat(Email).SendMessage("Hi!");
}
break;
}
}
}
PS: you also seemed to miss the end quote for the sent message.
quote:
Originally posted by ultimatebuster
js code:
Messenger.OpenChat(Email).SendMessage('Hi!);