We get messages from the ICQ network using three callback functions which can be found in lines 150-153:
void (*icq_UserOnline)(struct icq_link *link, unsigned long uin, unsigned long status, unsigned long ip, unsigned short port, unsigned long real_ip, unsigned char tcp_flag );
void (*icq_UserOffline)(struct icq_link *link, unsigned long uin);
void (*icq_UserStatusUpdate)(struct icq_link *link, unsigned long uin, unsigned long status);
But what does the network notify about?
When a user in your contact list goes online, the icq_UserOnline function is called with the user's UIN and connection details (so you know to ``paint him in blue'' for example).
When a user in the contact list goes offline, the icq_UserOffline function is called with the UIN of the user (so you know to ``paint him in red'').
When the status of a user in the contact list changes, the icq_UserStatusUpdate callback is called with the UIN of the user and its new status. From our experience, if you assign a callback function to this handler, the other two functions (icq_UserOnline and icq_UserOffline) will not be called.