Simple IRC - Simple To A Fault

(My semester project)

2/26/2025

IRC, or Internet Relay Chat, is a protocol as simple as its name. It's the backbone of early internet chatrooms since 1988, and is still in use today.

IRC has always been a little fascination for me. Like most technology, I stare at it in amazement, wondering how it works, how the little gears in it turn. Eventually, I get too curious and decide to shove my hands in the gears, mangling my flesh just to get a hint at the inner workings.

When learning new things, you need to be chewed up and spat out by the thing you wish to learn. Maimed and hurt before gaining the knowledge that you used to be unworthy of.

I know this is a weird start to a post. I'm currently in English class and wanted to write a little creatively before going into the more technical stuff lol.


The technical stuff

IRC is a dead simple protocol. Every message is a simple text message containing the message itself and some way to tell the server that the message is over. It's like a radio operator listening to someone elses bullshit until they hear "over". There's a LOT more to the protocol, but since this is a semester project I needed to keep it simple. On top of that, I'm not exactly using the IRC protocol.


I can't believe it's not IRC!

As a way to simplify the project for myself and for time reasons, it isn't using the real IRC protocol. My main reason is the documentation for the protocol is a little confusing for me to read, and has a lot of features that aren't needed for this small project. The protocol is VERY simple, but the documentation makes it really hard to read for someone like me who isn't used to reading the white papers for protocols like these.


The Green Text Papers

I forgot to put magenta in the printer :(

"Simple IRC - Simple To A Fault" or "SIRC" is more or less IRC only in name. The only concept taken from the IRC protocol is the relay system.

Messages are sent to all other clients through the server. The server listens for messages from clients, reads the message, then relays it to all other connected clients. It's a simple system that is quite elegant. It's easy to implement and quite simple to work with when you want to add features like commands.

Commands are sent the same as messages. A client sends a message that starts with a command character (like ! or /), which the server uses to filter for commands. The server then takes this string and splits it up, using the first word after the command character as the desired command and the other words as arguments for the command.


The real technical stuff

I haven't done many things with networking before so this project is a lot of me throwing shit at the wall and seeing what sticks.

One of the things I wanted to try with this project is to make a command system that didn't require me to manually update the list of available commands. One of the problems this website has (and something I could easily fix, but just haven't) is that to get the sidebar on the left to show the blog posts, I have to update a text file with the name of each blog post every single time I write one of these, and that's a problem I wanted to solve in the IRC project to save myself the hassle.

The idea is to have a Command Manager that holds a list of Command objects that have a method attached to them with the code they run when called, and a list of aliases to help recognise what command is being ran.

The main inspiration for this comes from the Source Engine (as most of my inspiration for projects comes from). The console in source games is a very nice system where commands all have help text associated with each command, which makes it really nice to find out what any command does at a moment's notice.

There's a bunch of other stuff I want to talk about here, but to keep things as simple as SIRC, here's a list of features I plan/want to have.


Where is the project currently?

Currently, it is a simple console app for both the client and server, which prints almost everything to the console. I have networking and simple relaying functional, but kinda buggy. The code is a mess and is being reworked. Overall though, it is in a good place for a semester project. I have a basic vertical slice working and I know how to fix most of the problems I've ran into with this project. I've got a bright outlook on the project right now!


That's all for now, folks!

Take care of youself and each other! Drink water, eat food, take pride in your work. Every little bit of art you make, every line of code you write, every little word spoken has an impact on the lives of others. Use that power for good. Make masterpieces for others to enjoy. Use your words to bring comfort to those who are uncomfortable. Hope you have a lovely day! Take care!