I incorrectly specified the timezone as UTC, when it needs to be
given the local timezone (so it can convert the always-in-UTC
epoch time into the correct local time).
Stop swimming against the tide and accept what most of the rest of
the world does.
While it adds an annoying depth to the actual source code, it makes
the root directory nicer (no more 'test-res' dirs), means we don't
have to override the gradle config, and makes it nicer to work in
IDEA 2016.1.
OutputQueue is now abstract, and the different queue methods
are subclasses.
This allows the same flexibility as before (subclasses can change
the type of items they add, implement their own throttling logic,
and say how the queue is ordered).
Organising it this way makes the package a lot easier to understand
as there's no longer a messy separation of concerns between
OutputQueue and QueueHandler (e.g. the output stream is no longer
in two places with two send methods, all of the definitions
relating to how the queue works are in one place, etc).
Instead of having lots of objects implement Comparable or Comparator,
pass the comparator in to the PriorityBlockingQueue.
This requires recreating the queue if the QueueHandler is ever changed,
but the previous behaviour resulted in an unstable/undefined ordering,
so it's probably better this way anyway.
This means that QueueItems no longer need to know about QueueHandler,
which makes me slightly happier.
This allows the logic to be expressed more nicely and tested
independently of the handlers. It also paves the way for a
bit of refactoring to reduce the number of random things
that need to be comparable...
Use Java8 date types for parser queue items. Fix the time check in
QueueHandler to check if the item has been queued for longer than
10 seconds, rather than if the item was created within 10 seconds
of the epoch.
Add IRCDataInEvent that presents an IRCReader.ReadLine object rather than just the line of data.
This gives us access to MessageTags (#19) and pre-tokenised lines in DataIn rather than everything neededing to tokenise themselves.
There are probably a few other events we want to expose messagetags on that we still don't.
Try to keep track of channel keys (Close Issue #108)
- Parses outgoing JOINs to try and guess keys before we get the MODE reply.
- Parsing algorithm based on Quakenet/Hybrid handling of keys.
- Keys are swallowed from the key-list for EVERY channel that is
to join, even if it is not needed, so you would need to use
"JOIN #Foo,#Bar,#Baz Foo,,Baz" to join keyed channels #Foo and #Baz.
- Key changes by mode +k and -k will be tracked.
- Ignores attempts to set the key as "*" if we know a "better" key.
- Side effect: If the key is actually set to "*" we can only learn it if that
is what we join with, or it gets changed to that from no-key.
When we moved to events, we stopped passing null in place of clients.
Instead, fake clients should be used. Apparently ProcessKick wasn't
properly updated.
Fixes issue #100