in reply to Quicky Aimbot question

Well, the Net::AIM docs on the "start" method specificly say "This just starts an infinte loop of $aim->do_one_loop;". So it seems like they are encouraging you to do your own looping if you want.

I would suggest that you don't even bother connecting to the AIM server untill the server goes down, and then don't bother calling start, just send your message and disconnect.

Bear in mind, there are other modules that might have more intuitive APIs: Net::AIM and Net::AOLIM (which is much newer then the others)

Replies are listed 'Best First'.
Re^2: Quicky Aimbot question
by castaway (Parson) on Jul 16, 2004 at 16:00 UTC
    .oO( Why are there so many of these darn things? ) I've been using Net::OSCAR which works pretty well.. (I amended some things, but now I've forgotten what ,) - A quick glance at Net::AOLIM makes me thing I'll stick with Net::OSCAR for now..

    C.

      Well I got my aimbot written.

      I still had to rely on an event from the server to kick anything off, fortunately the act of logging on produces an event that I can use to kick off what I want.

      The do one loop command loops the serve to see if there's anything there for the client.

      As far as I can tell there is no way to simply initiate the client and send a message. You have to have an event from the server, like an IM, an error, a chat invitation, something, in order to to get the AimBot to do something.

      Anyways thanks for tips, here is my shempy code below. It aint pretty but it does what I want. Namely read an OpenNMS database for outages and then sametime those outages to me:

      #Aimbot to read outages in an OpenNMS database #http://opennms.org) and IM outages to myself.
      use DBI; use Net::AIM; $aim = new Net::AIM; $conn = $aim->newconn(Screenname => 'mybot', Password => 'mybotpassword'); $conn = $aim->getconn(); $conn->set_handler('config', \&on_config); $aim->start; sub on_config { my ($self, $event) = @_; my ($str) = $event->args; my @things = subONMS(); $self->set_config($str); foreach $things (@things){ $self->send_im($friend, $things); $self->send_im('sk1nums', $things); sleep(2); } exit; } sub subONMS{ my $dbh = DBI->connect("dbi:Pg:dbname=opennms;host=localhost", "uname", "pword") or die "Can't connect to postgres db: $!\n"; my $fullquery = "SELECT nodeid FROM outages where ifregainedse +rvice is null"; my $sth = $dbh->prepare($fullquery) or die "Can't prepare SQL statement: ", $dbh->errstr() +, "\n"; $sth->execute() or die "Can't execute SQL statement: ", $sth->errstr(), "\n" +; while(@rows = $sth->fetchrow_array()){ push(@data,@rows); } $sth->finish; $dbh->disconnect; return @data }