v0.33.1: fix hot reload re-registration, add !hello, comprehensive docs
- 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).
This commit is contained in:
parent
76ae9cc1ef
commit
476554d2cb
4 changed files with 1093 additions and 45 deletions
|
|
@ -75,6 +75,7 @@ zynk/
|
|||
| `zynk <key>` | Look up a stored value |
|
||||
| `zynk <key> = <value>` | Store a value |
|
||||
| `!ping` | Responds with pong |
|
||||
| `!hello` | Responds with hello and the user's name |
|
||||
| `!weather [city]` | Current weather (default: Berlin) |
|
||||
| `!forecast [city]` | 3-day forecast |
|
||||
| `!ai <question>` | Ask the AI a question |
|
||||
|
|
|
|||
16
CHANGELOG.md
16
CHANGELOG.md
|
|
@ -1,3 +1,19 @@
|
|||
2026.07.19 – Hot reload re-registration fix.
|
||||
|
||||
- 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`.
|
||||
- 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.
|
||||
|
|
|
|||
5
Makefile
5
Makefile
|
|
@ -16,6 +16,10 @@ endif
|
|||
|
||||
all: zynk
|
||||
|
||||
zynk: zynk.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@.tmp $< $(LDLIBS)
|
||||
mv -f $@.tmp $@
|
||||
|
||||
calc: zynk.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
|
||||
|
||||
|
|
@ -28,4 +32,3 @@ install: calc
|
|||
|
||||
uninstall:
|
||||
rm -vf $(DESTDIR)$(BINDIR)/zynk
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue