DesertBus/txircd — pull request #53 by ElementalAlchemist (2012-10-05 16:52:09+00:00)
Title: Implement x:lines

Here we go!

I spent some time since I started cleaning things up and making it a bit neater, so hopefully you don't find this TOO terrible (even if it is long).

I've implemented all the lines you've come to know and love, including g:lines, k:lines, z:lines, q:lines, e:lines, and, yes, even shuns. (You can see the list of allowed SHUN commands in handleCommand, because it was easier that way.)

All the lines work just as you'd expect, except with the added feature of users who are already opers being immune, since you love that so much. :P Try to pay attention to when you're banning yourself, since you won't get immediate feedback on that.

I even did expiry already. Instead of running a timer, we remove expired x:lines at match time (which is easier than running a timer, anyway).

We could argue for or against storing all lines in one dictionary in this way. I've already used it a couple times to my advantage, however, and I feel like it'll make things easier later when we do s2s (waaay in the future, I know, but it doesn't hurt to plan ahead, right?) since we can send ADDLINE (or whatever command we decide) during BURST by iterating through that one dictionary and sending them that way.

Let me know if you find anything off, or if it breaks horribly for you.
If I get to the other pull request first (later today), this one may or may not need rebased. If I forget to check and it tells me that it can't be automatically merged, just prod me, and I'll pull and rebase.