XChat-Ruby Plugin Hosted at
SourceForge.net Logo

[ Project Page / Downloads / CVS ]


X-Chat is a slick, Gtk+2-based IRC client for windows and linux. It supports a very flexible C interface for writing plugins, and also has the ability for plugins to be written in Perl, Python, and Tcl.

For those of us that prefer the Ruby programming language above all others, the XChat-Ruby Plugin now allows X-Chat plugins to written in Ruby, in addition to the other supported scripting interfaces. This means that, for the first time, you can use a purely object-oriented language in which to write X-Chat plugins.


25 Apr 2007

Released version 1.2. Fixed bugs with the print functions. Added x86_64 release. Added support for compiling on Mac OS X 10.4.

A release after over 3 years! The reason why, is because there's a new developer (me). I was trying to make a script for XChat and discovered some bugs while trying to hunt down another bug. Although they were simple to fix, and some fixes were already in the bug tracker, they were quite annoying unfixed. I wanted to pass the fixes on to a release for everyone, so here I am. Jamis said he won't be developing anymore. I probably won't be very active either, but I'll try to check back every few months. Judging from the level of activity over the past 3 years, it seems to be pretty quiet.

8 Aug 2003

Released version 1.1. This is mostly a bug fix release, but it also improves how the plugin plays with Ruby 1.8. The binary releases of 1.1 are for 1.8 only, and will almost certainly NOT work with 1.6.x. However, the source code (if you aren't afraid of compiling the plugin yourself) should compile cleanly if you only have Ruby 1.6.x installed.

The bugs that got fixed include: script priorities were being ignored, hooks with the same name weren't playing well together (the older hook was getting removed), and hook return codes weren't being evaluated correctly.

So what?

And why would you want an object-oriented interface to write plugins? Well, several reasons, naturally. I will be the first to admit that OO is a strategy like any other, with strengths and weaknesses, but plugins seem to be inherently well-suited to an OO architecture.

Naturally, the arguments that follow are only relevant if you are a software developer. If all you want is something to run plugins, then you'll only use the XChat-Ruby plugin if you have a plugin you want to use, that needs it. If you are a software developer, however, you may need some additional convincing.

A plugin naturally lends itself to being an "object." It is a simple matter to encapsulate all of a plugin's internal functionality using instance methods, and is very convenient to use some of these methods as X-Chat callback hooks. Also, by inheriting each plugin class from the XChatPlugin class, all of your plugins easily gain functionality that is common to all plugins.

Also, because Ruby has a very flexible "mix-in" approach to multiple-inheritance, you can reuse pieces of various plugins, mixing and matching components to customize plugins, fitting them to very specific, or very general, needs.

Where are the screenshots?

What's to see? It's a library that plugs into X-Chat. Go to the X-Chat homepage if you want to see what X-Chat looks like.

Where can I find plugins written in Ruby?

XChat-Ruby comes with a few sample plugins. Other plugins can be found at the X-Chat homepage, although they may be written in anything. If you are looking, specifically, for Ruby plugins, I'm afraid I don't know of any resources for that. Perhaps, if there is enough demand, something can be set up here.

Who are you, and why are you doing this?

I'm, you know, just this guy. I like to code. I think X-Chat is cool, and I like writing scripts in Ruby. I thought they would go well together. I still do.

-- Jamis Buck (jgb3 at email.byu.edu)