I coded my first plugin for gaim (an instant messaging client) the other day. Actually, it is the first plugin I wrote at all.
It is not very beneficial, more precisely, it is absolutely senseless. But I think it's kinda fun, and maybe someone else will too.
First a little background story: I'm sure, you all know Chuck Norris Facts. It's an Internet phenomenon, inspired by Chuck Norris jokes on Late Nite with Conan O'Brien (which is my favorite late night show, BTW). Similar facts also exist for Bob Saget, Vin Diesel, Jack Bauer and, as i recently came across, Linus Torvalds.
This is a Chuck Norris fact, for example:
There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.
Anyway, i thought it would be amusing to have a plugin for gaim, that spits out a random fact, each time the name "Chuck Norris" is mentioned in an IM conversation.
And this is exactly what the plugin does. It scans the messages for a specific phrase, and sends a randomly chosen reply back. The plugin comes with 20 preloaded Chuck Norris facts.
You can change the phrase, that triggers an autoreply, and the list of replies in the plugin configuration. In other words, you can completely divert it from its intended use. Please let me know, if you find a useful purpose. ;)
At the end of this post, you will find two files. One is the source code, and the other a compiled Linux binary for gaim 2.0beta6. I'm sure it will work with previous 2.0beta versions, too.
If you download the binary (chucknorris-XgaimX.so), copy it into the folder:
You may have to create the folder plugins. Restart gaim, and activate it in the plugin settings.
If you download the source code, you have to compile. This is actually pretty easy on Linux:
- Download the gaim source code from here (make sure, it matches your installed version of gaim).
- Extract the package somewhere.
- Access the directory in your terminal.
- Type: ./configure and do whatever you've got to do, to make it configure without errors :)
- Copy the source file into the folder libgaim/plugins.
- Access that folder in your terminal.
- Type: make chucknorris.so
- Proceed with chucknorris.so as mentioned above.