2
0
Fork 0
forked from zynk/zynk

Full forecast mode, 24h times, startup version, doc fixes. (0.40.5)

- Added 'full' keyword to !forecast: '!forecast frankfurt full' shows
  per-day detail lines with weather description, sunrise/sunset, and
  moonrise/moonset in 24-hour format, sent as separate IRC messages.
- Added to_24h() helper to convert wttr.in's 12-hour AM/PM astronomy
  times to 24-hour format (e.g. '05:20 AM' -> '05:20').
- Fixed missing first letter of weather descriptions in full mode
  ('value' offset was 11 instead of 10, skipping the first char).
- Startup message now includes the version: '[zynk 0.40.5] starting up'.
- Added doc comments to to_24h(), find_day_obj(), and other forecast
  helper functions with full parameter documentation.
- Fixed 'Not implemented...' fallback to only trigger when ! is
  followed by a letter (e.g. !foo), so bare ! or !!! no longer
  produce the message.
- Updated README.md to document !forecast [city] [full] syntax.
- Updated CHANGELOG.md with 0.40.5 entry.
This commit is contained in:
Johannes Findeisen 2026-07-23 23:52:18 +02:00
commit d4c1b7cfcf
6 changed files with 335 additions and 64 deletions

2
irc.h
View file

@ -390,7 +390,7 @@ static void handle_privmsg(Session *s, const char *params, const char *src_nick)
#ifdef HAS_CMD_GREETING_OR_CHAT
cmd_greeting_or_chat(s, msg, reply_target, src_nick);
#endif
if (msg[0] == '!')
if (msg[0] == '!' && msg[1] && isalpha((unsigned char)msg[1]))
irc_msg(s, reply_target, "Not implemented...");
}