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
When an AI query fails (opencode exits non-zero), the bot previously
sent a generic 'AI query failed (opencode exited with error)' message
to IRC, discarding all useful output. Users had no way to diagnose why
the query failed.
Changes:
- Redirect opencode's stderr into the capture pipe instead of /dev/null,
so error messages that go to stderr are no longer lost.
- On non-zero exit, include the actual captured output in the error
message sent to IRC: 'AI error (exit N): <output>' (truncated to
4000 chars). If no output was captured, show 'AI error (exit N, no
output)' instead.
- Applied strip_formatting() to the error output before sending so
ANSI codes and markdown don't leak into IRC.
- Bumped VERSION to 0.34.3.
Add collapse_spaces() utility that reduces runs of whitespace to a
single space. Applied to fetch_forecast() output and the !stock
response buffer before sending to IRC, fixing double spaces that
appeared when wttr.in returned an empty weather condition string
(e.g. "15°C / Sun 20 Jul" instead of "15°C / Sun 20 Jul").
Bump version to 0.34.2.
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.
wttr.in now serves a full HTML page when it detects a browser-like
User-Agent string. Replaced the fake Firefox UA in run_curl with
"zynk/VERSION" so weather, forecast, and stock requests all return
the expected format again.
- Fixed hot reload: after TLS session restore, the bot now does a fresh
IRC connection and re-sends PASS/NICK/USER to re-register with the
server, fixing the issue where channels were never re-joined after
!reload or !restart.
- Removed ZYNK_RESTORE_FD env var approach; reload_try_restore now
restores settings and returns 1 to trigger a fresh connect.
- Added !hello command for casual greeting.
- Added atomic build rule in Makefile (compile to .tmp, then mv).
- Added comprehensive function-level documentation across the entire
codebase (~80 new doc comments).