v3.10.0
This release adds mapping of IRC colours 16 and above to terminal ANSI colouring, as recommended at https://modern.ircdocs.horse/formatting.html#colors-16-98. The old behaviour can be re-enabled by disabling core.extendedOutgoingColours
.
Many functions responsible for various Twitch API operations were rewritten into delegates that get passed to a common function, which in turn retries them a hardcoded number of times or until they return without throwing. This deduplicated a lot of code and should prove more robust than previous solutions.
In places where a $random
token could be supplied in user-defined strings (to be automatically replaced with a value between 0-100 exclusive), an additional syntax $random(i..n)
is now also supported. This allows for a random number other than default one between 0-99 to be generated. The upper-bounds n
is exclusive, and $random
is thus equivalent to $random(0..100)
.
Added a core.reexecToReconnect
setting that makes the program re-execute itself when it would otherwise have reconnected, such as upon connection lost or upon server request. This should help with minimising memory use that can otherwise steadily grow when torture-testing over longer timeframes, but is generally not necessary.
On Posix it uses the execvp
function and the new instance neatly replaces the old one in-place. Windows lacks this feature, so on Windows we fake the behaviour by spawning a new process in a minimised console, and then exiting the program. For now, Powershell is hardcoded to be used as the shell console.
Note that settings changed while the program was running will not transfer to the new instance, unless they were first saved to the configuration file or other persistent resource files. It will simply relaunch itself with the arguments passed to the original instance. (This merely means that changes from any kameloso: set plugin.setting=value
commands will not carry over.)
- Added setting
core.extendedColours
, used to toggle use of terminal ANSI colours above the base 16 - As mentioned above, added setting
core.extendedOutgoingColours
, used to toggle use of IRC colours above the base 16 - Added setting
connect.maxPingPeriodAllowed
, hidden from the configuration file, used to customise how much time in seconds the program should allow between PINGs received before suspecting something is wrong - Restored Twitch
!shoutout
; it has its uses, despite/shoutout
being a thing now - Made some effort to not write things out to the terminal if headless mode is enabled. Some still gets printed out, but only where it's invasive to fix.
- Various refactoring and tweaks