NAME
Net::OICQ - Perl extension for QQ instant messaging protocol
SYNOPSIS
use Net::OICQ;
$oicq = new Net::OICQ;
$oicq->login($qqid, $passwd, "Invisible", "tcp", $proxy);
# or
# $oicq->login($qqid, $passwd, "Invisible", "udp");
$oicq->send_msg("52482796", "Hello");
my $resp = $oicq->timed_recv(1024, 5);
print unpack("H*", $resp), "\n";
$oicq->logout;
DESCRIPTION
This module implements an object-oriented interface to QQ instant messaging protocol. It requires two Perl modules, Digest::MD5 and Crypt::OICQ. Net::OICQ class provides methods to connect to a QQ server, and send commands to other QQ users via the server.
Net::OICQ::ServerEvent class provides methods to parse messages received from the server.
Net::OICQ::ClientEvent class provides methods to process messages sent from a client.
Net::OICQ::TextConsole class is an example of using the above classes for a command-line interface.
CLASSES
Net::OICQ
Constructor:
$oicq = new Net::OICQ;
Methods:
$oicq->login($qq_id, $qq_passwd, $connect_mode[, $tcp_or_udp[, $http_proxy]]);
$oicq->send2svr($command, $data[, $seq]); # $seq is optional
$oicq->logout;
Net::OICQ::ServerEvent
Constructor:
$s_event = new Net::OICQ::ServerEvent $data, $oicq;
Methods:
Net::OICQ::ServerEvent is a subclass of Net::OICQ::Event and inherits all methods of
Net::OICQ::Event. Net::OICQ::ServerEvent has a method for each QQ command supported
by Net::OICQ module.
Net::OICQ::ClientEvent
Constructor:
$event = new Net::OICQ::ClientEvent $data, $oicq;
Net::OICQ::Event
This is the super class for Net::OICQ::ServerEvent and Net::OICQ::ClientEvent. It does not have a constructor.
Methods:
client_ver, cmdcode, seq, cmd, process, parse and dump
EXPORT
None by default.
AUTHOR
Shufeng Tan <perloicq@yahoo.com>
SEE ALSO
perl.