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.
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.
Make all package-private fields and methods they hackily touched
into public, for now.
Change-Id: Ica056a901535b0c0f503283d27ff5210fe625d26
Reviewed-on: http://gerrit.dmdirc.com/3952
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Get rid of weird round-the-houses method of processing, and avoid
duplicating the value in a map and a field.
This fixes our handling of servers doing really stupid, theoretical
things like resetting the CHANTYPES they support. (And by "fixes"
I mean the parser will keep state, while everything else burns
around it.)
Change-Id: Ie4936f21e68e4bb1134e9be3f16932eef4ab086f
Reviewed-on: http://gerrit.dmdirc.com/2831
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
Introduce methods for handling individual bits, instead of having
a pair of giant if statements of doom.
Tidy some comments and formatting up at the same time.
This is functionally the same as it was before.
Change-Id: I83f09cb6c36be203d102c44188f90de2b0587e58
Reviewed-on: http://gerrit.dmdirc.com/2812
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Add support for "away-notify" capability (http://ircv3.atheme.org/extensions/away-notify-3.1)
Add support for "account-notify" capability (http://ircv3.atheme.org/extensions/account-notify-3.1)
Add support for "extended-join" capability (http://ircv3.atheme.org/extensions/extended-join-3.1)
Don't bother negotiating UHNAMES or NAMESX using PROTOCTL if we have already enabled the userhost-in-names and multi-prefix capabilities with CAP
Don't bother asking for TSIRC using the TIMESTAMPEDIRC command if we have negotiated it using CAP
Rename "tsirc" capability to "dfbnc.com/tsirc" as a non-standard capability
From a DMDirc point of view, capabilities probably need exposing through the general interface somehow so that if (for example) away-notify is enabled, the client doesn't still send lots of WHOs.
Change-Id: Ice7a8ceae5595a364881e5a1fbe2d7fbdef9a639
Reviewed-on: http://gerrit.dmdirc.com/2544
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Add support for "TimestampedIRC" (See: http://shanemcc.co.uk/irc/#timestamping)
- This is used for backbuffer support in DFBnc, we currently only care about timestamps in
ProcessMessage, everything else will just use the current time in their callbacks as before.
Change-Id: I248bfd4d72800465ba4b06331261a8519690c3d5
Reviewed-on: http://gerrit.dmdirc.com/2172
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Add ServerTypeGroup to allow grouping of servers with common behaviour. (Fixes issue 3491).
Switch everything that does something on a per-ircd basis to use ServerTypes not Strings.
Deprecate getIRCD() in favour of getServerSoftware() and getServerSoftwareType().
Change-Id: I324eaadeb39a9999f7dd9d7b8e6bd583dce7abca
Reviewed-on: http://gerrit.dmdirc.com/431
Reviewed-by: Chris Smith <chris@dmdirc.com>
Tested-by: Chris Smith <chris@dmdirc.com>
If we have a 0-length string just ignore it.
Fixes issue 2942
Change-Id: I963aab86ff426fed0fa22fdbd1b3dce36818106a
Reviewed-on: http://gerrit.dmdirc.com/88
Reviewed-by: Chris Smith <chris@dmdirc.com>
Tested-by: Chris Smith <chris@dmdirc.com>