2
0
Fork 0
forked from zynk/zynk

v0.35.1: fix !calc not working (bc stdin not connected)

The !calc command was broken because the expression was never piped to
bc's stdin - only stdout was set up via a pipe. Added a second pipe
to feed the expression into bc before reading the result.

- Bumped version to 0.35.1
This commit is contained in:
Johannes Findeisen 2026-07-20 02:58:11 +02:00
commit 0906d825d3
2 changed files with 7 additions and 2 deletions

View file

@ -1,7 +1,12 @@
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.
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).
- Added `!time [timezone]` command: display current time in any IANA timezone (e.g. `!time US/Pacific`, `!time Europe/Berlin`).
- Added `!time [timezone]` command: display the current time in any IANA timezone (e.g. `!time US/Pacific`, `!time Europe/Berlin`).
- 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.

2
zynk.c
View file

@ -29,7 +29,7 @@ int asprintf(char **, const char *, ...);
/* ---- constants ---- */
#define VERSION "0.35.0"
#define VERSION "0.35.1"
#define DEFAULT_SERVER "irc.libera.chat"
#define OPENCODE_BIN "/usr/bin/opencode"
#define CLR_RESET "\033[0m"