PDA

View Full Version : A.I. for AIM


ignoranceisblis
03-01-2005, 05:35 AM
I wrote a small A.I. based on my NAIM log files, and a few other commands I build it

I wrote the script to run, store the respone in a file, then read the file

in this way I can go

perl /var/www/cgi-bin/arty/arty.cgi 'user=elliot&externalfile=bashtalking&talk=hello'
# that would say "hello" to arty as the user "elliot" and store the response in "bashtalking"

I put arty on IRC (/server ignoranceisbliss.ath.cx #ignoranceisbliss) by having him run that script to anything anyone says, followed by a short script to read whatever I called the temp file

I was wondering if anyone could describe how I could put arty on AIM, I have the Net::AIM module, but I have no idea what to do with it

T.I.A.

p.s. also I built a small web interface, if you don't like IRC, the address is arty.homeunix.com

ignoranceisblis
03-02-2005, 02:11 AM
I discoverd Net::AIM and a few examples on how to connect to the aim server
it keeps telling me:
Can't call method "add_handler" without a package or object reference at arty_aim line 8.

I found the example at webreference.com
here it is

use Net::AIM;
my $nick = "clusterofmayhem";
my $aim = new Net::AIM;
$aim->debug(1);
my $conn = $aim->newconn(Screenname => 'ArtyMachine',
Password => 'thepassword')
or die "Can't connect to AIM server.\n";
$conn->add_handler('config', \&on_config);
$aim-start;
sub on_config {
my ($self, $event) = @_;
my ($str) = $event->args;
$self->set_config($str);
$self->send_im($nick, 'testing...');
}

is there another module that I need to make it work?

mlseim
03-02-2005, 05:54 PM
I've never used Net::AIM, but for all of my module help, I go here:

http://search.cpan.org/search?query=Net%3A%3AAIM&mode=all



.

ignoranceisblis
03-03-2005, 03:29 PM
thanks, your link hooked me up
I got him working,
he is on AIM as ArtyMachine if anyone wants to talk to him

ianbaber
02-28-2006, 08:42 PM
How was this issue resolved? I'm stuck at the same place trying to use Net::AIM and getting the add_handler error. cpan isn't helping me at all, or I might just not be seeing something in the documentation. Can someone point me in the right direction here?