Closed doc-hex closed 8 years ago
Ok, I think I'm done now! Whew. Rigorous setup you've got here.
This is excellent! I agree that pack/unpack and associated tests should be a lot easier to extend; it's certainly the least maintained section of code.
Only question: I thought I pulled the names of reply strings from rfc2812; is there any reference to it being WHOREPLY
instead of RPL_WHOREPLY
?
I want to give it another review tomorrow but I'll probably end up merging as-is. If you don't mind, please add yourself to the Contributors section of the README. No pressure if you'd prefer not to.
Yes, RPL_WHOREPLY
is the correct value from the RFC. I'm not familiar with IRC protocol at all, but from what I've learned making this change, it seems like only the numeric value is used at the wire-level (352
) and I found the wording of this constant to be annoying (reply+reply).
It's visible to the users of the library when they register a trigger for this event, and I saw that another IRC library had called the same event WHOREPLY
and that seems so much more natural, etc...
I'm not married to it, just give the word and I'll change it back. A longer-term solution would be a way to alias the event codes. Similar issues, IMHO, with RPL_NAMREPLY
which is missing an E
for some historical reason.
Aliases are certainly something I want to support; I'll open an issue.
I'd like to keep RPL_WHOREPLY, even though it is ugly. Since most networks are using codes (well, at least freenode and a few python servers I could find) I would rather stick to the RFC for now.
If you don't mind that change, I'm happy to merge.
Thanks again for implementing this, even through the nitpicking!
:rocket:
Unpacking for WHO and NAMES responses.