2026-07-20 03:56:25 +02:00
2026.07.20 – Fix !time to work without tzdata.
- Rewrote `!time` to try the system `localtime_r()` first, then fall back to a built-in timezone table with 45 IANA zones and simplified DST rules when the system can't resolve timezones (e.g. no `tzdata` installed). This means `!time Australia/Sydney` now shows correct AEST/AEDT even on minimal systems.
docs: document all undocumented functions, add built-in timezone table to README
- Added doc comments (/* ... */) to all 14 undocumented static functions in
zynk.c matching the existing documentation style (function name, description,
Parameters, Returns sections):
* DB ops: seen_update, seen_lookup, tell_add, tell_deliver
* String utils: valid_irc_word, normalize_city, collapse_spaces
* Command handlers: cmd_reload, cmd_time, cmd_seen, cmd_tell, cmd_greeting_or_chat
* Timezone helpers: tz_lookup, tz_format
- Added complete reference table of all 45 built-in timezones to README.md
with region, UTC offset, and DST support status, so users know which
timezones work without tzdata installed.
- Updated CHANGELOG.md v0.35.5 entry to reflect these additions.
- Clean build, zero warnings.
2026-07-20 05:06:50 +02:00
- Added doc comments to all undocumented functions in zynk.c: `seen_update` , `seen_lookup` , `tell_add` , `tell_deliver` , `valid_irc_word` , `normalize_city` , `collapse_spaces` , `cmd_reload` , `cmd_time` , `cmd_seen` , `cmd_tell` , `cmd_greeting_or_chat` , `tz_lookup` , `tz_format` .
- Added full list of built-in timezones to README.md (all 45 entries from `tz_table` ) with region, offset, and DST status.
2026-07-20 03:56:25 +02:00
- Version bumped to 0.35.5.
2026-07-20 05:42:59 +02:00
2026.07.20 – Update README with !calc pi() docs and date requirement.
- Added `pi()` constants section to README.md with examples (`!calc pi()` , `!calc pi()*2` , `!calc pi()^2` ).
- Added `date` to the list of system requirements in README.md.
- Version bumped to 0.35.4.
2026-07-20 06:43:11 +02:00
2026.07.20 – Add pi() to !calc.
- Added `pi()` function support to `!calc` : bc -l does not define `pi()` on all systems, so `cmd_calc` now prepends a `pi()` definition before evaluating expressions. `!calc pi()` , `!calc pi()*2` , `!calc pi()^2` etc. all work.
- Version bumped to 0.35.3.
2026-07-20 03:16:01 +02:00
2026.07.20 – Fix !time timezone conversion bug.
- Fixed `!time` command: `setenv("TZ",...) + localtime()` was not reliably converting to the requested timezone. Replaced with `TZ=... date` via `popen()` , which handles all IANA timezone names correctly (e.g. `!time Australia/Sydney` now shows 11:15 AEST instead of UTC).
- Version bumped to 0.35.2.
2026-07-20 02:58:11 +02:00
2026.07.20 – Fix !calc not working (bc stdin not connected).
- Fixed `!calc` command: the expression was never piped to `bc` 's stdin, causing empty output and a "no result" error for every expression. Added a second pipe to feed the expression into `bc` before reading the result.
- Version bumped to 0.35.1.
v0.35.0: add !calc, !time, !seen, !tell commands
New IRC commands:
- !calc <expr>: evaluate math via bc -l (arithmetic, powers, trig, log, vars)
- !time [tz]: show current time in any IANA timezone
- !seen <nick>: track/query last-seen activity (auto-updated on speak/part/quit)
- !tell <nick> <msg>: leave offline messages, delivered when target speaks
Database:
- Added 'seen' table for user activity tracking (nick, timestamp, channel, action)
- Added 'tell' table for pending offline messages
Other changes:
- Updated !help to list all new commands
- Updated README.md with detailed docs for all commands including !calc
expression syntax and !time timezone examples
- Bumped version to 0.35.0
2026-07-20 02:43:21 +02:00
2026.07.20 – Calculator, time, seen, and tell commands.
- Added `!calc <expression>` command: evaluate math expressions via `bc -l` (supports arithmetic, powers, trigonometry, logarithms, variables, and multi-statement expressions).
2026-07-20 02:58:11 +02:00
- Added `!time [timezone]` command: display the current time in any IANA timezone (e.g. `!time US/Pacific` , `!time Europe/Berlin` ).
v0.35.0: add !calc, !time, !seen, !tell commands
New IRC commands:
- !calc <expr>: evaluate math via bc -l (arithmetic, powers, trig, log, vars)
- !time [tz]: show current time in any IANA timezone
- !seen <nick>: track/query last-seen activity (auto-updated on speak/part/quit)
- !tell <nick> <msg>: leave offline messages, delivered when target speaks
Database:
- Added 'seen' table for user activity tracking (nick, timestamp, channel, action)
- Added 'tell' table for pending offline messages
Other changes:
- Updated !help to list all new commands
- Updated README.md with detailed docs for all commands including !calc
expression syntax and !time timezone examples
- Bumped version to 0.35.0
2026-07-20 02:43:21 +02:00
- Added `!seen <nick>` command: track and query when users were last seen (auto-updated on PRIVMSG, PART, and QUIT).
- Added `!tell <nick> <message>` command: leave offline messages for users, delivered automatically when they next speak.
- Added `seen` and `tell` tables to the SQLite database for persistent user tracking and message storage.
- Updated `!help` to list all new commands.
- Updated README.md with detailed documentation for all commands, including `!calc` expression syntax and `!time` timezone examples.
- Version bumped to 0.35.0.
2026-07-20 01:44:21 +02:00
2026.07.20 – Disabled stripping feature from 0.34.4 because it needs more testing.
- Disabled `strip_opencode_header()` (introduced in 0.34.4) as it requires further testing.
- Version bumped to 0.34.5.
2026.07.20 – Strip opencode header from AI responses.
- Added `strip_opencode_header()` to remove the opencode model/agent header line from AI responses before sending them to IRC.
- Version bumped to 0.34.4.
2026-07-19 23:01:55 +02:00
2026.07.19 – Show full AI error output on failure.
- AI error messages now include the actual opencode output instead of a generic "(opencode exited with error)" message.
- Captured stderr from opencode (previously sent to /dev/null) so error details are no longer lost.
- Version bumped to 0.34.3.
2026-07-19 19:54:36 +02:00
2026.07.19 – Collapsed double spaces in `!forecast` and `!stock` responses
- Collapsed double spaces in `!forecast` and `!stock` responses (e.g., when weather condition is empty).
- Version bumped to 0.34.2.
2026-07-19 16:47:49 +02:00
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` .
2026-07-19 18:39:30 +02:00
- 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.
2026-07-19 16:47:49 +02:00
- Version bumped to 0.34.1.
2026-07-19 02:06:32 +02:00
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.
2026-07-19 01:29:22 +02:00
- 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` .
2026-07-19 02:06:32 +02:00
- 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.
2026-07-19 01:29:22 +02:00
- 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 03:43:00 +02:00
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.
2026-07-16 03:47:09 +02:00
- Fixed control char leak in irc_msg: drop the message on strdup failure instead of sending unsanitized input on the wire.
2026-07-16 03:43:00 +02:00
- Fixed CRLF/control char injection in -pass argument: reject passwords containing control characters at startup.
2026-07-15 21:03:42 +02:00
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.
2026-07-15 21:12:29 +02:00
- Added !help command to list available bot commands.
2026-07-15 21:19:28 +02:00
- Added -opencode command-line option to set the path to the opencode binary, overriding OPENCODE_BIN.
2026-07-16 03:07:33 +02:00
- 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.