jostein.kjønigsen.net

Irc framework in C# / .NET

Background

Some time ago we had a YahtzeeBot on NekoNet, but it didn't have any cool statistics nor database backing, so getting any useful statistics was impossible.

Eager on some proper stats, I decided to write a bot from scratch just to get that sweet, sweet database backing that would allow me to generate all kinds of amusing numbers from the actual games played.

Never having written any IRC-code outside clients like BitchX and irssi, I quickly realized that if I wanted to do this in C#, I would have to write a complete framework for the IRC client-server interaction. So that's what I did.

I'm sure there are a dozen IRC-frameworks available already, but I thought it was a fun thing to make, plus it allowed me to write some actual networking code, something I had never done before in .NET.

Features

Currently Irc.NET sports a few nice features.

- 100% Event based

All bot-server interaction is handled trough subscribed events, so you just need to specify what you want to be notified of, and react to those events. The framework handles the rest.

- Modularity

The framework handles client-applications trough the use of modules implementing standardized interfaces. That way all you have to do is implement a interface and plug it into the core framework.

Currently you can use modules for server-logins, server-logouts, log-handling and the actual irc-bot.

- Multithreaded

Multithreading has been implemented in the framework, so you don't have to worry about it.

- Ease of use

Going from nothing to a functional ircbot requires minimum effort. There's even a simple demo-program showing how to set it up.

Lackings

The framework in its current state is not entirely complete. A few features are in fact lacking. If I wasn't already happy about how the framework works, I'd be onto these things as of now, but hey! What works, works.

- No client-server ping

Yes. The client will not detect a timeout from the server. I really should fix this one.

- Full IRC RFC specs are NOT implemented

There are a few things that the framework will not handle. I basicly buildt it to cover my needs, and it supports the most commonly used IRC commands.

Download

So, if you are interested, you are free to download the source-code here and try it out.

Feedback is appreciated.

Thanks to

Various reasons

Misc stuff