Commit Graph

4 Commits

Author SHA1 Message Date
Shiz ae9d2bad8a Refactor IRC message parsing into extensible architecture.
Instead of having a single monolithic function in the pydle.protocol
module parse messages, there will now be a protocol.Message class
features can extend from to add functionality to the parser.
Consequently, all internal callbacks have been changed to take messages
as arguments instead of a collection of metadata about the messages.

A message object should provide the following API:
- __init__(command, parameters, **kwargs): create a message.
- (static) parse(line, encoding='utf-8'): parse a line into a message.
  Should return a message instance or raise protocol.ProtocolViolation
  on error.
- construct(): turn message into a raw IRC line ready to send to the
  server.

pydle.Connection has new APIs to deal with differing message classes.
2014-02-02 16:26:03 +01:00
Shiz f859455d55 Add documentation for pydle.featurize. 2014-01-23 03:00:16 +01:00
Shiz d09e466861 Fix outdated README statements. 2014-01-23 02:50:52 +01:00
Shiz 0fc2391f7a Initial import. 2014-01-23 02:44:19 +01:00