IRC Client Library 3.0.1 released!

Version 3.0.1 of the Kitteh IRC Client Library has been released!

Changes

  • Fixed bug where all insecure connections were prevented from starting.
  • Scheduled automatic PING queries task cancelled at connection close.
  • Event management shut down at Client shutdown.
  • Now supports incoming message lengths of up to 4096 bytes.
    • Twitch's IRC support has been observed sending up to 2240 bytes.

IRC Client Library 3.0.0 released!

Version 3.0.0 of the Kitteh IRC Client Library has been released!

As this is a major update, there's a lot to discuss. I'm breaking it down into non-breaking and breaking changes, with headings under each for changes worth talking more about.

Non-breaking Changes

  • SNI support - Server hostname is now sent to the server for TLS connections.
  • Updated to use latest Netty (4.1.6).
  • ServerMessage is now accessible in ClientReceiveServerMessageEvent and KittehServerMessageException
  • Added Client.Builder#queryChannelInformation() to allow disabling automatic WHO queries.
  • The version of KICL in use is now available via Version.getVersion().
  • KICL version is now included in the default realname.
    • Current realname default is "KICL 3.0.0 - kitteh.org".
  • Reduced chance of lost messages during reconnect.
    • The client, rather than the connection, holds the sending queues.
  • Provided events provide useful toString().

STS Support

Strict Transport Security is a mechanism that lets servers specify to clients to only connect securely. Support for the draft IRCv3 specification for STS has been added. The documentation covers using STS in detail.

Customizable Default Messages

It is now possible to define the messages sent by default in the following situations:

  • Client automatically reconnecting due to STS.
  • Client automatically reconnecting due to ping timeout.
  • Client automatically reconnecting due to IO exception.
  • Client automatically disconnecting due to STS and inability to connect securely.
  • Disconnecting without specifying a quit reason.
  • Kicking a target without specifying a kick reason.
  • Leaving a channel without specifying a part reason.

The DefaultMessageMap allows you to specify, for each DefaultMessageType, the default message to use in the above scenarios. A default implementation is provided and is used automatically, though you can implement DefaultMessageMap yourself. Perhaps you want the reconnection message to be dynamic. Now you can do this.

Breaking Changes

All sections below, including separate headings, include some breaking changes.

  • Created .commands() methods in Client and Channel.
    • Provides Commands for various... commands.
    • Some methods in Channel are moved here.
    • This is the start of a full migration of commands into this method.
  • The channel adding methods in Client now consistently reject channel names perceived as invalid.
  • The channel removal reason and quit reason methods now accept null.
    • This is because you can now have non-null defaults for these, per above customizable defaults.
  • RequestedChannelLeaveEvent renamed to UnexpectedChannelLeaveEvent.
    • This better reflects that this event is for when you've left a channel despite never calling a method to remove yourself from it.
    • The two subclasses have been renamed to reflect this as well.
  • The Change class, used in events, has migrated to the util package.
  • The Replyable helper has been accurately renamed to ReplyableEvent.
  • RequestedChannelJoinCompleteEvent moved to the event.channel package.
  • UnexpectedChannelLeaveEvent moved to the event.helper package.

A change to shading / relocating

KICL's libraries (MBassador, Netty) have been, until this point, shaded and relocated in the distributed jar file. This is no longer the default. Instead, the default jar you acquire by the groupId and artifactId does not have either shaded, and the compiled classes in that jar do not expect the library classes to be relocated. Instead, you must include these libraries yourself.

However, if you wish to continue using a pre-shaded, pre-relocated jar file you can acquire it with the maven classifier conveniently named shaded.

Account / Nickname / Username Naming Consistency

Previously, the words 'account', 'nickname', and 'username' had been overlapping in meaning. Account is now exclusively used to refer to a registered account with the server.

  • Many parameter names updated to match this change.
  • AbstractUserPassProtocol is now AbstractAccountPassProtocol.
  • Username (auth element class) is now Account.

Flexible Message Delay

Message delay handling has been completely rewritten. The methods for setting a numeric delay are no longer present because that is no longer the only way to affect messages sent by the client.

You can now define what is effectively a supplier of MessageSendingQueue, a new class that takes messages in and sends them to a consumer when it chooses, via a function that takes in the Client currently in use. This can be done in the builder, and can be updated at any point via a method on Client which will cause an immediate change in actively used MessageSendingQueue.

Two implementations are provided:

  • QueueProcessingThreadSender:
    • Processes messages FIFO via QueueProcessingThread, with a default-empty checkReady method which allows for delaying in this method in subclasses.
    • Using this class, you could have a zero delay
  • SingleDelaySender:
    • A subclass of the above class, that waits a specified number of milliseconds between sends.
    • SingleDelaySender.getSupplier(int) provides convenience.
      • This, with a default of 1200 ms, is used by default.

IRC Client Library 2.3.0 released!

Update: 2.3.3 released. See below.

Version 2.3.0 of the Kitteh IRC Client Library has been released!

Changes

  • Classes with a getClient() method are now all of type ClientLinked.
    • StringUtil now possesses two toLowerCase() methods, one taking ClientLinked.
    • This means you can do StringUtil.toLowerCase(user, user.getNick()).
  • FilteringSubscriptionFactory now available, so you can have your own MBassador instance use KICL's annotation-based filter system.
  • Updated to Netty 4.1.4.
  • 2.3.1 - Servers that don't send PREFIX in the ISUPPORT message will no longer cause exception explosions.
  • 2.3.2 - Channel and user modes now override equals() and hashcode().
    • ModeStatusList#containsMode() now actually works. So that's nice.
  • 2.3.3 - Empty message tags now parsed correctly, not carrying a : with them.

IRC Client Library 2.2.0 released!

Version 2.2.0 of the Kitteh IRC Client Library has been released!

Changes

  • Tracking of ban, except, invite, and quiet lists (modes b, e, I, and q).
    • ModeInfo describes a particular entry.
    • ChannelModeInfoListEvent firing when the full list is retrieved.
    • Channel#setModeInfoTracking(ChannelMode, boolean) lets you start tracking the mode list.
      • Automatically sends a query for the full list, and tracks subsequent mode changes.
      • Suggested to run this in RequestedChannelJoinCompleteEvent.
    • Channel#getModeInfoList(ChannelMode) gets the list, if it's being tracked.
  • Added new method Format.stripAll() to strip both color and other formats at once.

IRC Client Library 2.1.2 released!

Version 2.1.2 of the Kitteh IRC Client Library has been released!

Changes

  • Now sends a colon before the server password if it contains spaces.
  • No longer sends an empty CAP REQ message if all desired capabilities are already requested.