A A

How to Block AIM’s Annoying ‘AOL System Msg’ in Pidgin

Fri, May 1, 2009

Code, Linux, Productivity, Tools, Workarounds

The following plugin for Pidgin will block the incredibly annoying and useless notifications from AOLSystemMsg on AIM.

“AOL System Msg: Your screen name (mrEman) is now signed into AOL(R) Instant Messenger (TM) in 2 locations. Click here for more information.”

To use, paste code in file, save file as blockaolsystemmsg.pl in ~/.purple/plugins/ and then open (or re-open) Pidgin and go to Tools -> Plugins (or press CTRL+U), and enable “Block AOLSystemMsg.” That should be it!

If you’re having any trouble, try going to Help -> Debug to open up Pidgin’s debug console.

#!/usr/bin/perl
# BlockAOLSystemMsg plugin tested on Pidgin 2.5.5. Put in ~/.purple/plugins/ and enable
use Purple;
our $target = 'AOL System Msg'; # case-insensitive
our $plugin_name = 'Block AOLSystemMsg'; 

%PLUGIN_INFO = (
  perl_api_version => 2,
  name => $plugin_name,
  version => "0.1",
  summary => "Blocks the screen name 'AOL System Msg'",
  description => "Ignore annoying 'your SN has signed on at 2 locations' AIM message",
  author => "Isam ",
  url => "http://biodegradablegeek.com",
  load => "plugin_load",
  unload => "plugin_unload"
);

sub loginfo { Purple::Debug::info($plugin_name, " @_\n"); }
sub minimize {
  my $r = lc($_[0]);
  $r =~ s/ //g;
  return $r;
}

sub plugin_init { return %PLUGIN_INFO; }

sub plugin_load {
  my $plugin = shift;
  $target = minimize($target);
  loginfo("Sight set on '$target'");
  Purple::Signal::connect(Purple::Conversations::get_handle(),
                          'receiving-im-msg', $plugin, \&callback, '');
}

sub plugin_unload {
  my $plugin = shift;
  loginfo('Block AOLSystemMsg Unloaded.');
}

sub callback {
  my ($acc, $sender, $msg, $flags) = @_;
  if (minimize($sender) eq $target) {
    loginfo("(BLOCKED) <$sender> $msg");
    return 1
  };
}

update: Fixed the botched code. Thanks.
Add me. I'm lonely Why not subscribe to the feed?. If you’re on a mobile device I suggest Viigo

Tags: , , , ,

10 Comments For This Post

  1. Dunvi Says:

    Does this work in Windows as well? I checked, and inside program files\pidgin\plugins they’re all .dll files instead of .pl, so I suspect not. Is there a way to make it work, if so, or do you not know?

    Thanks
    .-= Dunvi´s last blog ..*flailflailflail* =-.

  2. Isam Says:

    The .dll plugins are written in C but Pidgin also supports plugins written in perl (.pl). You will need to install perl on Windows and to make sure your Pidgin installation supports loading perl plugins.

    See http://developer.pidgin.im/wiki/Scripting%20and%20Plugins for more info.

    I completely forgot about AOLSystemMsg until seeing this comment ;)

  3. operat0r Says:

    can somebody compile this as a dll some how thanks

  4. James Tavares Says:

    The code is screwed up as posted. If you want this to work on your system (windows or linux), then you need to search and replace on:

    > with >
    < with <
    & with &

    After doing that in WordPad and saving as a Text Document to c:\program files\pidgin\plugins\blockaolsystemmsg.pl, I was able to get the plugin working on Pidgin 2.5.5 on Windows Vista.

    Good luck.

  5. James Tavares Says:

    … the blog even screwed up my post! You need to search and replace the following, removing the spaces I have intentionally inserted:

    & g t ; with >
    & l t ; with <
    & a m p ; with &

  6. Sam Says:

    No, you can’t compile a perl script to a DLL. You just need to install perl (the interpreter) in order to allow Python to run the script.

  7. Chris Says:

    the above commenters are correct that the perl code has been altered by HTML encoding

    i wrote a C plugin to do this

    code is here: http://www.pidgin.im/nopaste/104

  8. Jonathan Says:

    This works! Thanks so much, that msg was driving me nuts.

  9. Shoku Says:

    This is such a huge frustration among people using anything but a desktop with a stable landline internet connection- why isn’t an already compiled file readily available?

    I’m not a programmer but I might be able to figure out how to make a dll file in a couple of days during spring break when my assignment load temporarily lightens up. I’m cruising along at a really high stress level though so having to close the system message a few more times might end with my throwing a fit.

    I would greatly appreciate it if someone that actually knows their way around this stuff could help me avoid that by a wider margin.

  10. Andrew S Says:

    Thank you! This was exactly what I was looking for and it worked perfectly.

1 Trackbacks For This Post

  1. IRC: #boycottnovell @ FreeNode: May 3rd, 2009 - Part 2 | Boycott Novell Says:

    [...] http://biodegradablegeek.com/2009/05…; (http://meandubuntu.wordpress.com/2009/05/0…;) [...]

Leave a Reply