From 6e5167bda78936ff04e9743f0b6322b349ac7b97 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Mon, 29 May 2023 11:56:00 -0500 Subject: [PATCH] Fix invalid-RPL_TOPICWHOTIME error --- ircc.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ircc.scm b/ircc.scm index ccf7971..ccdbe65 100644 --- a/ircc.scm +++ b/ircc.scm @@ -167,9 +167,11 @@ [(eq? reply RPL_TOPICWHOTIME) (let ([channel (second params)] [setter-nick (third params)] - [time (time-unix->time-utc (string->number (last params)))]) - (irc:channel-set! conn channel 'topic-set - (time->date time)))] + [time (if (string? (last params)) + (time-unix->time-utc + (string->number (last params))))]) + (if (time? time) + (irc:channel-set! conn channel 'topic-set (time->date time))))] [(eq? reply RPL_NAMREPLY) (let ([channel (third params)] @@ -398,7 +400,7 @@ [sender (irc:line-sender str space-split)] [verb (irc:line-verb str space-split)] [command (car verb)] - [reply (string->number (car verb))] + [reply (and (car verb) (string->number (car verb)))] [params (irc:line-verb-params verb)]) `((command . ,(if (not reply) command #f)) (reply . ,reply)