File: //usr/local/ssl/local/share/man/man3/Net::AIM::Connection.3
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "AIM::Connection 3"
.TH AIM::Connection 3 "2002-04-23" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
Net::AIM::Connection \- Interface to an AIM connection
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module handles the connection and communications between us and the server. It parses the incoming data and hands it off to handler methods if they are defined. It currently supports and follows the \s-1TOC\s0 protocol and contains methods to send out our information and messages.
.SH "METHODS"
.IX Header "METHODS"
.IP "Net::AIM::Connection\->new($hash_ref)" 4
.IX Item "Net::AIM::Connection->new($hash_ref)"
.Vb 8
\& Net::AIM::Connection-E<gt>new( {
\& Screenname => 'perlaim',
\& Password => 'yaddayadda',
\& TocServer => 'toc.oscar.aol.com',
\& TocPort => 80,
\& AuthServer => 'login.oscar.aol.com',
\& AuthPort => 5159
\& }
.Ve
.Sp
Creates a new Connection object and tries to connect to the \s-1AIM\s0 \s-1TOC\s0 server.
This method creates and objet and calls connect with all the arguments passed to it.
.IP "$aim_conn\->new($hash_ref)" 4
.IX Item "$aim_conn->new($hash_ref)"
.Vb 10
\& $aim_conn-E<gt>new( {
\& Screenname => 'perlaim', #required
\& Password => 'ilyegk', #required
\& TocServer => 'toc.oscar.aol.com',
\& TocPort => 9898,
\& AuthServer => 'login.oscar.aol.com',
\& AutoReconnect => 1,
\& Agent => 'Net::aim mychat', # DONT USE 'AIM'!!!
\& AuthPort => 5159
\& } );
.Ve
.Sp
Sets up a connection to the \s-1AOL\s0 \s-1TOC\s0 server.
.IP "$aim\->normalize($data)" 4
.IX Item "$aim->normalize($data)"
This method normalizes \f(CW$data\fR by killing all but strict alphnumeric
characters. Typically used for screen_names.
.ie n .IP "$aim_conn\->send_im($screen_name, $message)" 4
.el .IP "$aim_conn\->send_im($screen_name, \f(CW$message\fR)" 4
.IX Item "$aim_conn->send_im($screen_name, $message)"
This method sends \f(CW$message\fR to \f(CW$screen_name\fR.
.IP "$aim_conn\->set_idle($idle_time)" 4
.IX Item "$aim_conn->set_idle($idle_time)"
This method sets our idle time to \f(CW$idle_time\fR.
If \f(CW$idle_time\fR is omitted it will be set to 0.
.IP "$aim_conn\->add_buddy(@buddies)" 4
.IX Item "$aim_conn->add_buddy(@buddies)"
This method adds \f(CW@buddies\fR to our buddy list that is set on the server.
.IP "$aim_conn\->add_permit(@buddies)" 4
.IX Item "$aim_conn->add_permit(@buddies)"
This method adds \f(CW@buddies\fR to our permit list that is set on the server.
.IP "$aim_conn\->add_deny(@buddies)" 4
.IX Item "$aim_conn->add_deny(@buddies)"
This method adds \f(CW@buddies\fR to our deny list that is set on the server.
.IP "$aim_conn\->remove_buddy(@buddies)" 4
.IX Item "$aim_conn->remove_buddy(@buddies)"
This method removes \f(CW@buddies\fR from our buddy list that is set on the server.
.IP "$aim_conn\->set_away($message)" 4
.IX Item "$aim_conn->set_away($message)"
This method sets our idle time to \f(CW$idle_time\fR.
If \f(CW$idle_time\fR is omitted it will be set to 0.
.IP "$aim_conn\->get_info($screen_name)" 4
.IX Item "$aim_conn->get_info($screen_name)"
Sends an info request to the server for \f(CW$screen_name\fR. The server should
reply with a \s-1URL\s0 which will contain the info requested about the user.
.IP "$aim_conn\->set_info($info)" 4
.IX Item "$aim_conn->set_info($info)"
This method sets your info or profile information to \f(CW$info\fR on the server.
.ie n .IP "$aim_conn\->evil($user, $anon)" 4
.el .IP "$aim_conn\->evil($user, \f(CW$anon\fR)" 4
.IX Item "$aim_conn->evil($user, $anon)"
Warn \f(CW$screen_name\fR.
\&\f(CW$anon:\fR boolean value which will determine whether to warn the user anonymously or normally. Anonymous warnings are less severe.
.IP "$aim_conn\->send_to_AOL($message)" 4
.IX Item "$aim_conn->send_to_AOL($message)"
Send \f(CW$message\fR to the server. This is used internally by other functions
to send commands to the server.
.Sp
.Vb 1
\& $aim_conn->send_to_AOL('toc_add_buddy perlaim')
.Ve
.ie n .IP "$aim_conn\->chat_invite($room, $msg\fR, \f(CW@buddies)" 4
.el .IP "$aim_conn\->chat_invite($room, \f(CW$msg\fR, \f(CW@buddies\fR)" 4
.IX Item "$aim_conn->chat_invite($room, $msg, @buddies)"
Invite \f(CW@buddies\fR to \f(CW$room\fR with the message \f(CW$msg\fR
.IP "$aim_conn\->chat_accept($room_id)" 4
.IX Item "$aim_conn->chat_accept($room_id)"
This will accept an invitation that was sent to us for \f(CW$room_id\fR
.IP "$aim_conn\->chat_leave($room_id)" 4
.IX Item "$aim_conn->chat_leave($room_id)"
This method instructs the server to take you out of the room \f(CW$room_id\fR
.IP "$aim_conn\->chat_whisper($room_id,$user,$msg)" 4
.IX Item "$aim_conn->chat_whisper($room_id,$user,$msg)"
Whisper \f(CW$msg\fR to \f(CW$user\fR in the room \f(CW$room_id\fR
.ie n .IP "$aim_conn\->chat_send_to_AOL($room_id, $message)" 4
.el .IP "$aim_conn\->chat_send_to_AOL($room_id, \f(CW$message\fR)" 4
.IX Item "$aim_conn->chat_send_to_AOL($room_id, $message)"
Send \f(CW$message\fR in chat room \f(CW$room_id\fR
.IP "$aim_conn\->chat_join($roomname)" 4
.IX Item "$aim_conn->chat_join($roomname)"
Send a request to enter the room \f(CW$roomname\fR
.IP "$aim_conn\->\fIconnected()\fR" 4
.IX Item "$aim_conn->connected()"
Returns a boolean value based on the state of the object's socket.
.IP "$aim\->debug($debug)" 4
.IX Item "$aim->debug($debug)"
Set whether to print \s-1DEBUGGING\s0 information to \s-1STDERRR\s0.
Accepts \f(CW$debug\fR which should be a boolean value.
.IP "$aim_conn\->set_handler($evttype, \e&coderef)" 4
.IX Item "$aim_conn->set_handler($evttype, &coderef)"
Set a sub routine to be called when \f(CW$event\fR is encountered:
\f(CW$aim_conn\fR\->set_handler('error', \e&on_errror);
\f(CW$aim_conn\fR\->set_handler('im_in', \e&on_im);
.IP "$aim_conn\->encode($str)" 4
.IX Item "$aim_conn->encode($str)"
This method returns \f(CW$str\fR encoded as per the \s-1TOC\s0 specs: escaped special chars ({}[]$) and enclosed in quotes (")
.IP "$aim_conn\->encodePass($password)" 4
.IX Item "$aim_conn->encodePass($password)"
This method roasts \f(CW$password\fR according to the \s-1TOC\s0 specs. The roasted password is returned.
.IP "$aim_conn\->send_config($cfg_str)" 4
.IX Item "$aim_conn->send_config($cfg_str)"
Sends \f(CW$cfg_str\fR to the server to be used as configuration values for the account.
.IP "$aim_conn\->\fIread_and_parse()\fR" 4
.IX Item "$aim_conn->read_and_parse()"
Read a chunk of data off the connection to the server parse it and send it off to any defined handlers.
.SH "AUTHOR"
.IX Header "AUTHOR"
Aryeh Goldsmith <perlaim@aryeh.net>.
.SH "URL"
.IX Header "URL"
The Net::AIM project:
http://www.aryeh.net/Net\-AIM/
.Sp
The Net::AIM bot list:
http://www.nodoubtyo.com/aimbots/
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIperl\fR\|(1)