What's new? | Help | Directory | Sign in
Google
mzk
                
Search
for
Updated Apr 22, 2007 by sirdarckcat
Labels: Phase-Design, Phase-Implementation
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 an
event 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:
Called every loop.. if you want your program to be called every time, asign some function to this event. This functions has no arguments.
When the client receive the first challenge just after logging in, the function
specified here will be called.
This functions has no arguments.
When the client receives a notice from the server (Like a new MSN Callendar alert), this
function will be called.
This function has the following arguments:
$content - The content of the notice
For more information enter here: http://www.hypothetic.org/docs/msn/client/notification.php
When the client receives a message (From Hotmail), this function will be called. The messages
sent 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
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 especific
event for an especific chat session, you can do it with the events _[], example:
this will call the myfunction2 with the arguments: $id,$members[]
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
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 are
in the chat session.
Exactly the same as last one, but has another argument at the begining with the ID of the
chat session.
Arguments:
$id - Id of the chat session. $members[] - An array with the format: "$name $mail" of the contacts that allready are
in the chat session.
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.
Exactly the same as last one, but has another argument at the begining with the ID of the
chat 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.
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.
Exactly the same as last one, but has another argument at the begining with the ID of the
chat session.
Arguments:
$id - Id of the chat session. $who - the mail of the user leaving. $cmd - the full command sent by the server.
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
Exactly the same as last one, but has another argument at the begining with the ID of the
chat 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.

This function will be called when a message confirmation is received. (Note that by default all
notifications are disabled)
This function has 2 arguments:
$id - Id of the chat session. $cmd - the full command sent by the server.

Exactly the same as last one, but has another argument at the begining with the ID of the
chat session.
Arguments:
$id - Id of the chat session. $id - Id of the chat session. (again) $cmd - the full command sent by the server.


Comment by bvidinli, Aug 23, 2007

onlinefriends does not work, do you know why? it returns empty... but there are someone...

Comment by tuxtail, Jun 11, 2008

$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


Sign in to add a comment