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.