If I understand correctly: what he asks for is a code so his bot which is run from the server 24/7, will message his personal MSN account.
If his bot is a php script or whatever (thus a full blown msn client), he is asking his request in the wrong forum.
Only if his bot and server is running on Windows and uses Windows Live Messenger itself with Plus!, a Plus! script can be used for this. Otherwise he needs php code (or in whatever language his msn client is written)....
quote:
Originally posted by -!Felu!-
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if (Origin != Messenger.MyName){
var e = new Enumerator(ChatWnd.Contacts);
for(; !e.atEnd(); e.moveNext())
var Contact = e.item();
var From = "From : "+Contact.Email
var Message = "\n\nMessage : "+Message
Messenger.OpenChat(YourHomeEmail).SendMessage(From+Message);//edit to your home email
}
}
Simple code
...but buggy code.
What your code will do is sending a message for only the last contact there is in the conversation, even if the first contact has send the message (and as such, you don't need to use the for loop, just e.moveLast() would do).
quite possible that his bot never uses multi-contact chats, but even so, the bug in that script needs to be fixed:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
if (Origin !== Messenger.MyName) {
for (var e = new Enumerator(ChatWnd.Contacts); !e.atEnd(); e.moveNext()) {
var Contact = e.item();
if (Origin === Contact.Name) {
var From = "From : " + Contact.Email;
var Message = "\n\nMessage : " + Message;
Messenger.OpenChat(YourHomeEmail).SendMessage(From+Message);
return;
}
}
}
}