|
|
Events
List of all the events, and its trigger.
Documentation Index
Events
This library works based on events.. All important events the client receive has anevent code, and you can assign one function to that event.
For example: MezzengerKlient->onLogin="myfunction1"; will call myfunction1 when finished logging in.
The events available are:
- MezzengerKlient->onRock
Called every loop.. if you want your program to be called every time, asign some function to this event. This functions has no arguments.
- MezzengerKlient->onLogin
When the client receive the first challenge just after logging in, the functionspecified here will be called.This functions has no arguments.
- MezzengerKlient->onNotice
When the client receives a notice from the server (Like a new MSN Callendar alert), thisfunction will be called.This function has the following arguments:$content - The content of the noticeFor more information enter here: http://www.hypothetic.org/docs/msn/client/notification.php
- MezzengerKlient->onMessage
When the client receives a message (From Hotmail), this function will be called. The messagessent by Hotmail are notifications of new mail, between others.This function has the following arguments:$who ("mail nick") - Mail and nick separated by a single space. (This should allways be "Hotmail Hotmail") $content - Content of the message
- MezzengerKlient->onStatusChange
When some contact change his status, nick or gets online, this function will be called. This function has the following argument:$who ("$mail $nick $status") - Mail, nick and status of the contact. $avatar - The MSNC1 urlencoded block with the avatar.
This are the events for the main session, anyway, there are others for handling chat sessions. This events allow you to have a specific chat session event (so if you want to have an especificevent for an especific chat session, you can do it with the events _[], example:
- MezzengerKlient->onChatLoad_[1]="myfunction2";
this will call the myfunction2 with the arguments: $id,$members[]
- MezzengerKlient->onChatStart
When you are redirected to a new chat session this function will be called. This functions has the following argument:$id - id of the chat session
- MezzengerKlient->onChatLoad
This function will be called after succesfully joined to a chat session. This function has one argument:$members[] - An array with the format: "$name $mail" of the contacts that allready arein the chat session.
- MezzengerKlient->onChatLoad_[$id]
Exactly the same as last one, but has another argument at the begining with the ID of thechat session.Arguments:$id - Id of the chat session. $members[] - An array with the format: "$name $mail" of the contacts that allready arein the chat session.
- MezzengerKlient->onChatJoin
This function will be called when someone joins to the chat session. The function has 2 arguments:$id - Id of the chat session. $who ("$name $mail") - The nick and the mail of the user.
- MezzengerKlient->onChatJoin_[$id]
Exactly the same as last one, but has another argument at the begining with the ID of thechat session.Arguments:$id - Id of the chat session. $id - Id of the chat session. (again) $who ("$name $mail") - The nick and the mail of the user.
- MezzengerKlient->onChatLeave
This function will be called when someone leaves the chat session. The function has 2 parameters$who - the mail of the user leaving. $cmd - the full command sent by the server.
- MezzengerKlient->onChatLeave_[$id]
Exactly the same as last one, but has another argument at the begining with the ID of thechat session.Arguments:$id - Id of the chat session. $who - the mail of the user leaving. $cmd - the full command sent by the server.
- MezzengerKlient->onChatMessage
This function will be called when a message is received, this meesages include MSNSLP/P2P,Typing-User, and chat text messages, for a better formating, you should filter this response by MezzengerKlient->ProccessMessage.This function has 3 arguments:$id - Id of the chat session $cmd - the full command sent by the server. $message - message received
- MezzengerKlient->onChatMessage_[$id]
Exactly the same as last one, but has another argument at the begining with the ID of thechat session.Arguments:$id - Id of the chat session. $id - Id of the chat session. (again) $cmd - the full command sent by the server. $message - message received.
- MezzengerKlient->onMessageConfirm
This function will be called when a message confirmation is received. (Note that by default allnotifications are disabled)This function has 2 arguments:$id - Id of the chat session. $cmd - the full command sent by the server.
- MezzengerKlient->onMessageConfirm_[$id]
Exactly the same as last one, but has another argument at the begining with the ID of thechat session.Arguments:$id - Id of the chat session. $id - Id of the chat session. (again) $cmd - the full command sent by the server.
Sign in to add a comment

onlinefriends does not work, do you know why? it returns empty... but there are someone...
$t->onlinefriends DOES work
But your bot-account on MSN (passport) needs to have accepted the other users as friends. Not accepted as a friend, not an onlinefriend....
Best regards...
/tuxtail