

You may use either the numeric code or the corresponding string code. command_number specifies the event to handle.


Sets the handler function for a specific ICQ server event. If it is not called often enough, you will not be notified of incoming events in a timely fashion, or the server might even think you have disconnected and start to ignore you. This method does one processing loop, which involves looking for incoming data from the network, calling registered event handlers, sending acknowledgements for received packets, transmitting outgoing data over the network, and sending keepalives to the server to tell it that we are still online. If you need to do other processing, you could call do_one_loop as infrequently as once every few seconds. It uses select() to wait for data from the server and other ICQ clients, so it won't use CPU power even if you call it in a tight loop. If you don't want to (or can't) call the start() method, you must continuously call do_one_loop when your Net::ICQ object is connected to the server. Note that start() will not return until the Net::ICQ object is disconnected from the server, either by the server itself or by your event-handler code calling disconnect(). If you're writing a fairly simple application that doesn't need to interface with other event-loop-based libraries, you can just call start() to begin communicating with the server. Returns true if the Net::ICQ object is connected to the server, and false if it is not. Note that after calling new() you must next call connect() before you can send and receive ICQ events.Īll of the following methods are instance methods you must call them on a Net::ICQ object (for example, $icq->start).Ĭonnects the Net::ICQ object to the server.ĭisconnects the Net::ICQ object from the server.
HTTP SEARCH ICQ COM PASSWORD
If either a UIN or password is not provided either directly or through environment variables, new() will return undef. The built-in defaults (for server and port only) have the lowest priority. Server and port are optional, and default to '' and '4000', respectively.Īlso, environment variables will be checked as follows: uin - ICQ_UINĬonstructor parameters have the highest priority, then environment variables. The UIN and password to use are specified as the first two parameters. A Net::ICQ object represents a single user logged into a specific ICQ server. CONSTRUCTORĬreates a new Net::ICQ object. Net::ICQ is a class implementing an ICQ client interface in pure Perl. $icq->send_event('CMD_SEND_MESSAGE', $params) $icq->add_handler('SRV_SYS_DELIVERED_MESS', \&on_msg) Net::ICQ - Pure Perl interface to an ICQ server SYNOPSIS use Net::ICQ
