Why libairc?

Why did I create an entire new framework instead of simply modifying an old one? Very good question. I suppose the answer lies in the philosophy of libairc:

I created libairc because I was tired of the limitations of old frameworks. I don't mean that the old frameworks are in any way "bad". I learned to program IRC bots with PircBot, an excellent framework created by Paul Mutton (Jibbler). However, I soon grew tired of PircBot's limitations. I wanted a framework that would handle more for me, that would allow me to concentrate more on my bot development than on stuff like queues, parsing CTCP queries, and such. Also, I wanted a framework where everything was configurable.

That's why I first created libairc, as a framework for my own use. I originally called it aIRC, for Alex's IRC. As aIRC grew, I realized that others might want to use it as well, so I submitted it as a project to SourceForge, renamed "libairc", the Advanced IRC Library.

Anything I could think of that the framework should be responsible for went into libairc. For example, p-static has been working on bandwidth throttling features for the DCC engine. Why? Because it belongs there. What's more, although throttling is handled in the DCC core, the actual throttle, the part that determines how much bandwidth each transfer gets, is controlled by the user. This way, even something advanced like iroffer could be easily implemented against libairc.

That's the libairc philosophy: users should be able to concentrate on bot functionality, rather than on the details of its implementation. To realize this, I founded a new project, not because the old ones were lacking, but because they didn't need to be changed. I wouldn't want them to be changed. PircBot serves a need: it's the framework of choice for new bot developers. libairc was created to serve a different need: a framework for those who are developing large projects (like the iroffer and eggdrop bots) who need powerful features such as priority queueing.

I hope to expand the libairc project to include lots of new features to make it a desirable framework for large projects.

Why Java?

Another good question. Many veteran C/C++ programmers share a dislike of the Java language. While this is understandable to some degree (*cough*memory*cough*), Java is a great language for an IRC framework.

First of all, Java is more secure than C/C++. Since bots will be connecting to inherently unsafe IRC networks and will often come under attack, it's important that things like buffer overrun exploits don't exist. While this is possible in C/C++, it's easier to focus on functionality rather than on security if the language handles things for you.

Another good reason is that Java is a networking language. Socket operations are so much easier to implement than with C/C++. The same goes for threading, queues, and pretty much most of libairc.

Java is also cross-platform. Most people run the Windows operating system, so I wanted my bot to be accessible to them. At the same time, I wanted to be able to develop/host bots on my linux boxes. Java makes this possible.

The only problem I can forsee with this would be the hosting of bots on shell servers. I don't believe Java quite qualifies for this. However, I don't see this as a problem. Many home connections are stable enough for hosting a bot...and if you have several bots then the problem virtually disappears. One day I may port libairc to C/C++ for this purpose. Until then, I'm sticking with Java.

SourceForge.net Logo