[Twisted-Python] Re: IRCClient

Konrad Rokicki konrad at wam.umd.edu
Wed Feb 19 13:14:02 EST 2003


On 18 Feb 2003, Kevin Turner wrote:

> On Tue, 2003-02-18 at 12:33, Konrad Rokicki wrote:
> > I just started working with the IRCClient class (twisted.protocols.irc)
> > and unless I'm mistaken, it is missing some features like a userQuit event
> > and handling of NAMREPLY (for getting a list of users in a channel).
> > I was wondering if this module is still being actively developed and if I
> > should submit patches to do those sorts of things.
>
> What would you have them do?  The protocol does not dictate any response
> to these messages, and protocols.irc.IRCClient is intended to be an
> implementation of just the IRC client protocol.  The class is designed
> to be extensible so its users can subclass it and define their own
> irc_QUIT and irc_RPL_NAMREPLY methods.  The decision of what to do when
> you receive such a message is up to the application, I think.

I don't mean the client needs to respond to the messages. But why doesn't
it process a QUIT the same way it processes a JOIN or PART? The irc_QUIT
method could be implemented to parse the message and call userQuit.
The same goes for the NAMREPLY stuff except you'd also need a method
to request the names list. Sure, I could implement all this in my
subclass but wouldn't it be cleaner to hide all this protocol stuff inside
the protocol? That way my subclass would not need to know how to parse a
QUIT message.

-Konrad








More information about the Twisted-Python mailing list