Net::AIM

TriggerTek Logo
abcdefghijklmnopqrstuvwxyz_
AIM(3)		     User Contributed Perl Documentation	       AIM(3)



NAME
       Net::AIM - Perl extension for AOL Instant Messenger TOC protocol

SYNOPSIS
	 use Net::AIM;

	 $aim = new Net::AIM;
	 $conn = $aim->newconn(Screenname   => ’Perl AIM’,
			       Password	    => ’yaddayadda’);
	 $aim->start;

DESCRIPTION
       This module implements an OO interface to the Aol Instant Messenger
       TOC protocol.

       This version contains not much more than hacked code that merely con-
       nects to the aol TOC servers and acts on instant messages.

METHODS
       Net::AIM->new()
	   This is the Net::AIM constructor.  No arguments needed.

       $aim->debug($debug)
	   Set whether to print DEBUGGING information to STDERRR.  Accepts
	   $debug which should be a boolean value.

       $aim->set($key, $val)
	   This method simply sets $key to $val in an internal hash for vari-
	   ables

       $aim->get($key)
	   This method simply gets the value of $key from the  internal hash

       $aim->newconn()
	   This method creates a new AIM::Connection object

       $aim->getconn()
	   This method returns a pointer to the AIM::Connection object

       $aim->do_one_loop()
	   This executes one read off the socket.

       $aim->start()
	   This just starts an infinte loop of $aim->do_one_loop;

       $aim->timeout($secs);
	   This sets or returns the current timeout in seconds for the select
	   loop.  Takes 1 optional argument.  Fractional timeout values are
	   ok.

       $aim->add_buddy($send_bool, $group, @buddies);
	   This adds @buddies to your buddy list, under the group $group.  if
	   $send_bool evaluates to TRUE then the toc_add_buddy command is
	   sent to the server.	Otherwise it is not sent out.  This function
	   will also save the list internally.

       $aim->add_permit($send_bool, $group, @buddies);
	   This adds @buddies to your permit list, under the group $group.
	   if $send_bool evaluates to TRUE then the toc_add_permit command is
	   sent to the server.	Otherwise it is not sent out.  This function
	   will also save the list internally.

       $aim->add_deny($send_bool, $group, @buddies);
	   This adds @buddies to your deny list, under the group $group.  if
	   $send_bool evaluates to TRUE then the toc_add_deny command is sent
	   to the server.  Otherwise it is not sent out.  This function will
	   also save the list internally.

       $aim->remove_buddy($send_bool, $group, @buddies);
	   This removes @buddies from your buddy list. $group must be the
	   group they were orginally set with for them to be deleted from the
	   internal $aim memory and prevent them from getting added again
	   incase a set_config method is called.

	   if $send_bool evaluates to TRUE then the toc_add_deny command is
	   sent to the server.	Otherwise it is not sent out.  This function
	   will also save the list internally.

       $aim->set_idle($idle_time)
	   This method sets our idle time to $idle_time.  If $idle_time is
	   omitted it will be set to 0.

       $aim->get_info($screen_name)
	   Sends an info request to the server for $screen_name. The server
	   should reply with a URL which will contain the info requested
	   about the user.

       $aim->set_info($info)
	   This method sets your info or profile information to $info on the
	   server.

       $aim->evil($user, $anon)
	   Warn $screen_name.  $anon: boolean value which will determine
	   whether to warn the user anonymously or normally.  Anonymous warn-
	   ings are less severe.

       $aim->send($message)
	   Send $message to the server.	 This is used internally by other
	   functions to send commands to the server.

	      $aim->send(’toc_add_buddy perlaim’)

       $aim->chat_invite($room, $msg, @buddies)
	   Invite @buddies to $room with the message $msg

       $aim->chat_accept($room_id)
	   This will accept an invitation that was sent to us for $room_id

       $aim->chat_leave($room_id)
	   This method instructs the server to take you out of the room
	   $room_id

       $aim->chat_whisper($room_id,$user,$msg)
	   Whisper $msg to $user in the room $room_id

       $aim->chat_send($room_id, $message)
	   Send $message in chat room $room_id

       $aim->chat_join($roomname)
	   Send a request to enter the room $roomname

       $aim->send_im($screen_name, $message)
	   This method sends $message to $screen_name.

       $aim->list_rooms();
	   This method returns an @array of rooms each consisting of
	   ID:ROOM_NAME. For instance:
	      ’235236:Perl AIM Chat12’
	      ’234323:Perl AIM Chat13’
	      ’235832:Perl AIM Chat14’
	      ’125082:Perl AIM Chat15’

       $aim->get_roomname($id)
	   This method returns the name of the room with id $id.

       $aim->set_roomname($id, $roomname)
	   This saves $roomname in the $aim object in a %hash keyed on $id.

       $aim->del_roomname($id)
	   Deletes $id and it’s associate value from our roomname hash in
	   $aim

       $aim->encode($str)
	   This method returns $str encoded as per the TOC specs: escaped
	   special chars ({}[]$) and enclosed in quotes (")

       $aim->send_config()
	   This method instructs the module to send our configurations which
	   are the mode (permit/deny/all) and our buddy list to the server
	   and to set it as our saved config on the server

       $aim->send_buddies()
	   This method instructs the module to send all our current buddies
	   to the AOL server.

       $set_config_str($config_str, add_bool)
	   This parses a config string of the form:
		 g Buddies
		 p permit1
		 p permit2
		 d deny1
		 d deny2
		 b budd1
		 b budd2

	   Key:
	       g - Buddy Group (All Buddies until the next g or the end of
	   config are in this group.)
	       b - A Buddy
	       p - Person on permit list
	       d - Person on deny list
	       m - Permit/Deny Mode.  Possible values are
		   1 - Permit All
		   2 - Deny All
		   3 - Permit Some
		   4 - Deny Some

       $aim->normalize($data)
	   This method normalizes $data by killing all but strict alphnumeric
	   characters.	Typically used for screen_names.

AUTHOR
	   *   Written by Aryeh Goldsmith <perlaim@aryeh.net>, AIM:Perl AIM

URL
       The Net::AIM project: http://www.aryeh.net/Net-AIM/

       The Net::AIM bot list: http://www.nodoubtyo.com/aimbots/

SEE ALSO
       perl(1)



perl v5.8.8			  2002-04-23			       AIM(3)