Just add a utility method to get the callback proxy instead.
Think this is a bit nicer, and is one less thing to have to change
if we switch to events.
All callbacks are now done through getCallback, which offers
type safety (gasp!) and is potentially extensible in the future
(wow!).
This means that nothing can depend on callbacks existing, so
there are two functional changes:
- the parser will no longer disconnect automatically on failed
pings; users have to listen for the event and handle it
themselves;
- the parser will no longer attempt to automatically use alt
nicknames or create new nicknames on connection; users have to
listen for the event and implement the logic themselves
Both of these were really weird anyway, as adding a listener (even
for debugging purposes) disabled the built-in behaviour.
Add support for message tags from IRCv3 to IRCReader. Fixes #6
ReadLine now parses tags out of incoming lines (tags are not currently passed through the encoder)
IRCParser.tokeniseLine() now understands that tags may exist at the start of a line and tokenises accordingly.
(In reality, the only time it ever sees them is during testing)
Parser processLine now looks for timestamps from tags from the ReadLine, not by parsing token[0] itself.
Made IRCReader tests a lot less annoying to work with.