I am using net::OSCAR and I'm trying to write a bot. I'm using perl and everytime I send my bot an im it signs off. The following is the code to my bot :
then navigate in dos to your bot folder, run the bot and find out whats wrong. [right][snapback]47321[/snapback][/right]
My bot signs on and then in the dos console I get:
Couldn't set win32 blocking : unknown error
lokiBOT loaded successfully
Couldn't set win32 blocking : unknown error
basic OSCAR service: unknown extended info request
I read something about that win32 blocking request and changing code in connection.pm from die to warn. It already said warn so I don't know what's goin on with that.
It is an external file. It's in the same directory as the bot.
You set $screenname to $aim->screenname(); This returns the screenname of your *bot* You then send an IM to $screenname (your bot), with the message "lokiBOT"
And so then your bot will receive another on_im from itself and the message "lokiBOT", putting your bot on an infinite loop which will devour its rate limits and punt it offline.
I think what you wanted to do was this:
Code:
$aim->send_im ($client, "lokiBOT");
Quote:
$aim = Net::OSCAR object $client = the user's screenname who sent the message $msg = the message they sent to your bot $away = whether or not the user sent an away message $screenname = your bot's screenname
And yeah, you need to require the external files. _________________ Current Site (2008) http://www.cuvou.com/
Ok I got it to im the client. Thank You. And I assure you that my IQ is over 30. I'm still getting those errors though when I start my bot through the command prompt. Any Ideas?