2
0
Fork 0
forked from zynk/zynk
zynk/CHANGELOG.md
hanez 3727a5f72b Fix !forecast showing all days as Sunday on musl libc
strptime on musl (Alpine Linux) does not compute tm_wday from the
parsed date, unlike glibc. Call mktime() after strptime to normalize
the struct tm and reliably compute the day of week on all platforms.
2026-07-19 18:39:30 +02:00

3.8 KiB
Raw Blame History

2026.07.19 – Fix !weather returning HTML.

  • Fixed !weather command returning <!DOCTYPE html> instead of weather data: wttr.in now returns HTML when it detects a browser User-Agent, so replaced the fake Firefox UA string with zynk/VERSION.
  • Fixed !forecast showing all days as Sunday on musl libc (Alpine Linux): strptime on musl does not compute tm_wday, so added mktime() to normalize the struct before formatting.
  • Version bumped to 0.34.1.

2026.07.19 – Uptime command, remove !hello.

  • Added !uptime command: displays bot uptime in a human-readable format (days/hours/minutes/seconds).
  • Removed !hello command.
  • Version bumped to 0.34.0.

2026.07.19 – Hot reload re-registration fix, !hello, docs.

  • Fixed hot reload: after TLS session restore, the bot now re-sends PASS/NICK/USER to re-register with the IRC server, fixing the issue where channels were never re-joined after !reload or !restart.
  • Added !hello command: responds with a greeting and the user's nick.
  • Added atomic build target in Makefile: compiles to a temp file and moves into place to avoid partial binaries on failure.
  • Added comprehensive doc comments to all major functions in zynk.c.
  • Version bumped to 0.33.1.

2026.07.19 – Hot reload, stock quotes, and auto-recompile.

  • Added hot reload: !reload and !restart commands (ops) save TLS session state, fork a new process with the inherited socket, and resume without dropping from IRC.
  • Added !stock <SYMBOL>[,SYMBOL...] command to fetch real-time stock quotes from Yahoo Finance (up to 3 symbols).
  • Added auto-compile and restart on !code changes: when the AI code change response is received, the bot runs make and reloads on success.
  • Added User-Agent header to curl requests to avoid being blocked by servers that reject the default curl agent.
  • Increased curl read buffer from 2 KiB to 32 KiB to handle larger API responses.
  • Improved !forecast JSON parsing: returns a descriptive error message on parse failure instead of silently returning nothing.
  • Increased AI_TIMEOUT from 240s to 600s and AI_REPLY_MAX from 400 to 2048 chars for longer AI interactions.
  • Version bumped to 0.33.0.

2026.07.16 – Security hardening.

  • Fixed buffer overflow in ai_child_task: plen unsigned underflow when history entries exceed prefix buffer size, causing out-of-bounds writes via snprintf.
  • Fixed IRC injection in handle_nick_change: validate new nick for CRLF and control characters before storing in op cache.
  • Fixed control char leak in irc_msg: drop the message on strdup failure instead of sending unsanitized input on the wire.
  • Fixed CRLF/control char injection in -pass argument: reject passwords containing control characters at startup.

2026.07.15 – Numerous optimizations and fixes.

  • Fixed DB/TLS resource cleanup on partial startup failures and normal shutdown.
  • Fixed net_send() stack over-read risk when vsnprintf() truncates.
  • Fixed curl/opencode pipe readers so oversized output cannot deadlock the bot.
  • Fixed !code AI agent propagation into the forked child.
  • Added CR/LF rejection for startup IRC args to prevent local IRC command injection.
  • Normalized weather/forecast city input before building wttr.in URLs.
  • Fixed IRC op cache bugs around nick changes and long NAMES entries.
  • Added !version command to report the bot's version via IRC.
  • Fixed the malformed VERSION macro definition to ensure successful builds.
  • Added !help command to list available bot commands.
  • Added -opencode command-line option to set the path to the opencode binary, overriding OPENCODE_BIN.
  • Hardened IRC sending: strip control characters from messages and sanitize targets to prevent IRC injection.
  • Sanitized JOIN/NICK targets and PONG payload to avoid injection via CR/LF or control chars.
  • Validated -opencode path at startup to reject control characters.