Skip to content

v0.7.0

Latest

Choose a tag to compare

@slingamn slingamn released this 09 Aug 23:25
· 6 commits to master since this release
v0.7.0

irc-go v0.7.0 is a new tagged release. It includes enhancements to ircevent, our IRC client library. There are no API breaks relative to previous tagged versions.

Added

  • Added (*ircevent.Connection).MaxMessageLength() and FetchUserHost. MaxMessageLength can be used to compute the maximum length of a PRIVMSG or NOTICE message that can be sent to a target without truncation. By default, the initial invocation of MaxMessageLength returns a safe default value until a more accurate measurement can be obtained; FetchUserHost can be enabled to perform this measurement eagerly on each connection, at the cost of sending an additional command. (#114, #123, thanks @lollipopman!)
  • Added (*ircevent.Connection).SendBatch, SendBatchWithLabel, and GetLabeledResponseForBatch. These are APIs for sending a compliant IRCv3 client-initiated batch, for example with the multiline extension. (#106, #119)
  • Added (*ircevent.Connection).AddRawCallback, an API for adding callbacks that take in the unparsed IRC line, without filtering on the command. This can be used to implement programmatic debug logs, or catch-all handling of otherwise unhandled commands. (#76, #116, thanks @jcjordyn130!)

Security

  • ircevent is now more resilient to malicious BATCH responses from servers, including excessively large or deep batches. (*ircevent.Connection).MaxTotalBatchSize was added to limit the total size of buffered batch data; it defaults to 8 MiB when unset. (#118, #122)

Changed

  • Shortened the timeout for GetLabeledResponse (now approximately 1 minute by default) (#124)