From 6cfb1ad301136446811b9bf09a47e27cc0f11278 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 6 May 2022 20:25:16 -0400 Subject: Write unknown replies to Network with Ice heat --- handle.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/handle.c b/handle.c index 388a122..0baddf2 100644 --- a/handle.c +++ b/handle.c @@ -127,6 +127,15 @@ static void handleErrorGeneric(struct Message *msg) { } } +static void handleReplyGeneric(struct Message *msg) { + char buf[1024]; + char *ptr = buf, *end = &buf[sizeof(buf)]; + for (uint i = 1; i < ParamCap && msg->params[i]; ++i) { + ptr = seprintf(ptr, end, "%s%s", (i > 1 ? " " : ""), msg->params[i]); + } + if (ptr != buf) uiWrite(Network, Ice, tagTime(msg), buf); +} + static void handleErrorNicknameInUse(struct Message *msg) { require(msg, false, 2); if (!strcmp(self.nick, "*")) { @@ -232,6 +241,7 @@ static void handleAuthenticate(struct Message *msg) { static void handleReplyLoggedIn(struct Message *msg) { (void)msg; ircFormat("CAP END\r\n"); + handleReplyGeneric(msg); } static void handleErrorSASLFail(struct Message *msg) { @@ -255,9 +265,11 @@ static void handleReplyWelcome(struct Message *msg) { replies[ReplyNamesAuto] += count; } commandCompleteAdd(); + handleReplyGeneric(msg); } static void handleReplyISupport(struct Message *msg) { + handleReplyGeneric(msg); for (uint i = 1; i < ParamCap; ++i) { if (!msg->params[i]) break; char *key = strsep(&msg->params[i], "="); @@ -1403,5 +1415,7 @@ void handle(struct Message *msg) { if (handler->reply < 0) replies[abs(handler->reply)]--; } else if (strcmp(msg->cmd, "400") >= 0 && strcmp(msg->cmd, "599") <= 0) { handleErrorGeneric(msg); + } else if (isdigit(msg->cmd[0])) { + handleReplyGeneric(msg); } } -- cgit 1.4.1 ype='hidden' name='h' value='3.3.2'/>
path: root/compat/getpagesize.c (unfollow)
Commit message (Collapse)Author
2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe
2021-04-18Import LibreSSL 3.3.2June McEnroe
2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe
2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe
Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck.
2020-12-15Import LibreSSL 3.3.1June McEnroe
2020-11-24Import LibreSSL 3.3.0June McEnroe
2020-10-22Import LibreSSL 3.2.2June McEnroe
2020-09-29Import LibreSSL 3.2.1June McEnroe
2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe
2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe
2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe