[Twisted-Python] implementing NAMES in IRC

Tristan Seligmann mithrandi at mithrandi.net
Tue Sep 11 14:00:02 EDT 2012

On Tue, Sep 11, 2012 at 6:46 PM, Glyph <glyph at twistedmatrix.com> wrote:
> So... you're recommending exactly what twisted.words.im already does? :)

Well, yeah: "The only way to reliably use the NAMES command is the way
twisted.words.im.ircsupport [already does]" :)

> Keep in mind that we can assume to have control over outgoing traffic on our own IRC connection.  If you've already issued one .names(), then another outgoing one doesn't have to send an additional command and try to do weird Deferred-stacking stuff.  It just has to delay sending the actual NAMES request until the previous one has come back, or perhaps just fire both Deferreds with a single response.

On the other hand, if you're writing code that doesn't need to match
requests and responses, you should be able to issue another NAMES
command before the previous one has completed (and bear in mind, if
you want to queue NAMES requests independently of other requests, the
only ways for it to complete will be 1. RPL_ENDOFNAMES and 2.
timeout). That's why I would prefer this not to be baked into the
lowest level of the IRC client API. My earlier responses were probably
worded too harshly; people *are* going to attempt to implement things
like this, no matter how much of a bad idea it might be, so going
LALALALA WE WON'T LET YOU won't improve things. On the other hand, the
compromises needed to do things this way probably shouldn't penalize
people who are doing it the "right" way (insofar as anything about IRC
can be said to be "right").
mithrandi, i Ainil en-Balandor, a faer Ambar

More information about the Twisted-Python mailing list