[Twisted-Python] IRC protocol rewrite?

Ivo van der Wijk ivo at amaze.nl
Wed Jan 2 12:46:42 EST 2002

Hi All,

I'm currently investigating the IRC Protocol as implemented by twisted,
to see if I perhaps can use it in my irc client, or if it perhaps can
use code from my irc protocol parsing.

However, I noticed some bugs and (imho) design failures in the current
implementation, which makes the code not very usefull for any other 
use than what it's currently used for (twisted irc client + server?)

For example, channels are hardcoded as starting with '#', i.e.
IRCClient.join prepends a '#' to the channelname. Hoewever, most servers
support alernative style channels such as &channel (local channels),
+channel (modeless channels), and perhaps more.

Furthermore, IMHO, the IRCClient class implements too many protocols
in one class. IRC, CTCP and DCC are distinct protocols, and each belong
in their own class.

Lastly, the current parsemsg routine can't handle ipv6 addresses in certain 
replies, i.e. a 311 (whois) reply like:

:irc.xs4all.nl 311 VladDrac [p] -patrick 3ffe:2500:900:2000:1337:1337:1337:1337 *:foo

will be parsed incorrectly. I may provide a patch for this later.

Is replacing the current IRC protocol with a (non-api-compatible) new
protocol discussable? If so, I'll make some suggestions on how I would
implement the protocol.



Drs. I.R. van der Wijk                              -=-
Brouwersgracht 132                      Amaze Internet Services V.O.F.
1013 HA Amsterdam, NL                               -=-
Tel: +31-20-4688336                       Linux/Web/Zope/SQL/MMBase
Fax: +31-20-4688337                           Network Solutions
Web:     http://www.amaze.nl/                    Consultancy
Email:   ivo at amaze.nl                               -=-

More information about the Twisted-Python mailing list