Tuesday, February 25, 2014

kwak – release 0.2.0.1

The Apocalypse

A few days ago, freenode – an IRC server – was injured by some people performing a DDoS. It was very messy and apocalypse day, but we all ended up quite okay. Except for one little guy: kwak, my IRC tellbot.

What happened

During a netsplit or a DDoS, you might be disconnected from the server. All IRC clients might implement something against that. As you may have already noticed, my tellbot is not really an IRC client (laughter). But it acts like it was one. You can /whois it, you’ll get something – nothing interesting though. Then during a netsplit or DDoS, the tellbot is disconnected, but doesn’t reconnect since I didn’t foresee it could happen.

The patch

Then I wrote a patch – it took me five minutes; Haskell <3. The patch introduces some fixes against disconnections. I also added an anti-kick behavior – kick the tellbot, it’ll come back! It was not mandatory, but it was something like ten words of code, so…

The patch is not deployed yet. I’ll do the change tonight if I have some spare time.

In the next release, 0.2.1.0, I’ll add a support for a minimalistic admin session through direct connection to the bot. It’ll be used to correctly shutdown the bot – useful when maintaining – and then backup all stories in order to resume them later.

Note: a bug was discovered by LLB. Using !tell in private always succeeds whereas it mustn’t. I’ll push another patch for that issue.

No comments:

Post a Comment