Perl Net::Oscar Cannot Send Messages

Note

This fix has been implemented into the current version of Net::Oscar. Update to at least Net-OSCAR-1.928 and you will be fine. This page will be left up so someone can figure out why this message is appearing on their current version or if this problem ever sparks up again when AOL decides to kick off a certain version of AIM again.


Problem

Recently, AOL decided to send out a ridiculously long message to every user using an older version of AIM. The only problem is that their message literally crashes every perl bot running Net::Oscar. Of course the screenname is unblockable, and there's no way to make the error message disappear.

The message your affected bot may be receiving is as follows:

AIM: upgrade to the newest version of aim! in just a couple of days you will no longer be able to use the version of aim you are on to avoid a lapse in service, you must upgrade now don't worry, the upgrade process is quick and painless - we promise

Solution

There is a solution however, which requires you to modify the Common.pm file included in this module. You will have to determine where perl modules are on your own system, Net::Oscar was installed for me at /usr/lib/perl5/site_perl/5.8.8/Net/OSCAR but it will definitely vary from setup to setup.

Inside of that folder, locate the file Common.pm and open it with your text editor. Scroll to the section looks like:

use constant OSCAR_SVC_AIM => (
...
);

Replace that entire block with the following:

use constant OSCAR_SVC_AIM => (
	host => 'login.oscar.aol.com',
	port => 5190,
	supermajor => 0x0109,
	major => 0,
	minor => 99,
	subminor => 1,
	build => 0x0000,
	subbuild => 0x000000ef,
	clistr => "AOL Instant Messenger, version 5.5.3595/WIN32",
	hashlogin => 0,
	betainfo => "",
);

This will bump up your version of AIM that Net::Oscar uses to identify, and the AIM bot should stop messaging your bot now. Your bot should continue to function like normal now.