Repository navigation
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()andFetchUserHost.MaxMessageLengthcan be used to compute the maximum length of aPRIVMSGorNOTICEmessage that can be sent to a target without truncation. By default, the initial invocation ofMaxMessageLengthreturns a safe default value until a more accurate measurement can be obtained;FetchUserHostcan 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, andGetLabeledResponseForBatch. 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
irceventis now more resilient to maliciousBATCHresponses from servers, including excessively large or deep batches.(*ircevent.Connection).MaxTotalBatchSizewas 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)