I just figured out how to use the plugin features of GAIM. So no more ugly source code hacks. I just followed the simple.c sample in their plugin folder and voila ! Lo and behold, you now have fortunes in IM. I've simply used fortunes cookies from linux and routed them to GAIM through a pipe. So far it looks stable enough. Actually havent really stress tested this, but what the heck, it aint no big thing. My TODO things for this would be, to add GUI support for different fortune databases (the simpsons one is really cool).
How does it work?
Now that the interface is clean and all, to enable this, you just need to select the plugin through preferences. Of course you need to compile the source (make ashbert.so) from your source trees plugin folder and then copy it to the systems plugin folder (generally, /usr/lib/gaim). Restart/start Gaim, and you will see my plugin there. Just tick it.
Then when someone opens up a conversation window with you, and types fortune , he will get one ultra cool fortune. Of course in this case, its like _you_ are the fortune server. If you want to see the fortunes, either add yourself to your list and IM yourself OR tell your friend to install this plugin.
Here's the source code. I will also convert the Haddock insults patch(See links) into a plugin when I find time.
Till then Happy hacking.
Sunday, November 06, 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment