So I just tagged 0.2.8 and I think this thing is getting close to usable.
Quick recap for those who don’t know: Sux Services are IRC services I’m writing from scratch in C for the Azzurra IRC Network. The idea is: multithreaded, modular, SQL backend instead of flat files, and not a complete mess to maintain. We’ll see about that last part.
What works right now: NickServ does registration, identification, password change, ghost kill. ChanServ has channel registration, access lists (CF/SOP/AOP/VOP/AKICK) with masks support, and it actually enforces access on join. MemoServ sends and reads memos, notifies you on connect if you have new ones. OperServ has AKILL, server MAP, STATS. There’s even a RootServ for the really scary stuff.
The whole thing connects to a Bahamut IRCd, negotiates the server link, syncs all users and channels, and then the five service agents boot up as virtual users. Modules are compiled as .so files and loaded at runtime via GLib’s GModule. If I want to reload NickServ I just unload and reload the module, no restart needed. Pretty cool.
I’m testing it with netxplode which is a perl script that spawns 100 IRC clients and hammers services with random commands – IDENTIFY, INFO, REGISTER, JOIN, you name it. Basically 100 bots going completely nuts on NickServ and ChanServ at the same time. Found a lot of bugs this way. Also found an SQL injection in the nickname handling last week which was fun. Fixed now, we use sql_printf() to escape everything, but yeah, that could have been bad.
The threading is solid at this point. Four threads: network I/O on a GLib main loop, a parser that splits the receive buffer and dispatches commands through gperf-generated perfect hash tables (O(1) lookup, zero collisions, I love this thing), a signal handler thread, and the master that manages everything. Mutexes and condition variables for synchronization, GMemChunk pools for allocation. It doesn’t segfault anymore which honestly took a while.
If you want to try it or look at the code: project page, home page, or just grab the download. You’ll need GLib 2.2+, MySQL, and a Bahamut IRCd. BSD licensed.
Next up: OperServ needs more work, I want to add nick expiry, and the whole help system needs to be loaded from the database instead of being hardcoded. Also someone already filed a bug on sourceforge so I guess people are actually trying it =)