diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de8256..4a76778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +2026.07.19 – Fix !weather returning HTML. + +- Fixed `!weather` command returning `` 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`. +- 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). diff --git a/zynk.c b/zynk.c index 69de811..a2fd801 100644 --- a/zynk.c +++ b/zynk.c @@ -29,7 +29,7 @@ int asprintf(char **, const char *, ...); /* ---- constants ---- */ -#define VERSION "0.34.0" +#define VERSION "0.34.1" #define DEFAULT_SERVER "irc.libera.chat" #define OPENCODE_BIN "/usr/bin/opencode" #define CLR_RESET "\033[0m" @@ -1412,7 +1412,7 @@ static char *run_curl(const char *url) { close(fd[1]); int dn = open("/dev/null", O_WRONLY); if (dn >= 0) { dup2(dn, STDERR_FILENO); close(dn); } - execlp("curl", "curl", "-s", "--max-time", "10", "-A", "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0", url, (char *)NULL); + execlp("curl", "curl", "-s", "--max-time", "10", "-A", "zynk/" VERSION, url, (char *)NULL); _exit(127); } close(fd[1]);