Is this a good way check if a contact is in a trusted list?
Or is there a more efficient way to do it?
code:
var TrustedEmails = "john@hotmail.com,smith@hotmail.com";
function ConfirmTrusted(ChatWnd){
// pretend i passed the ChatWnd from OnEvent_ChatWndReceiveMessage
var e = new Enumerator(ChatWnd.Contacts);
for (; !e.atEnd(); e.moveNext()){
if (TrustedEmails.indexOf(e.item().Email) != -1){
return true;
}
}
return false;
}