From e2bebca7dcfa0af3e3a39b819595cfad593a49d8 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 20 Jun 2021 19:22:20 -0400 Subject: Handle "\1ACTION\1" empty actions --- handle.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/handle.c b/handle.c index bdf6db0..bfe6e8c 100644 --- a/handle.c +++ b/handle.c @@ -1163,10 +1163,18 @@ static void handleReplyNowAway(struct Message *msg) { } static bool isAction(struct Message *msg) { - if (strncmp(msg->params[1], "\1ACTION ", 8)) return false; - msg->params[1] += 8; + if (strncmp(msg->params[1], "\1ACTION", 7)) return false; + if (msg->params[1][7] == ' ') { + msg->params[1] += 8; + } else if (msg->params[1][7] == '\1') { + msg->params[1] += 7; + } else { + return false; + } size_t len = strlen(msg->params[1]); - if (msg->params[1][len - 1] == '\1') msg->params[1][len - 1] = '\0'; + if (msg->params[1][len - 1] == '\1') { + msg->params[1][len - 1] = '\0'; + } return true; } -- cgit 1.4.1 bout summary refs log tree commit diff
path: root/Linux (unfollow)
Commit message (Expand)Author
2021-08-26Support DESTDIR in install/uninstallJune McEnroe
2021-08-26Add version number generatorJune McEnroe
2021-08-22Add ISC license headerJune McEnroe
2021-08-22Update to Linux man-pages 5.12Štěpán Němec
2021-06-21Add manuals for macOS 11.3June McEnroe
2021-05-08Update to OpenBSD 6.9June McEnroe
2021-04-26Update to Linux man-pages 5.11June McEnroe
2021-04-26Update to FreeBSD 13.0June McEnroe
2021-01-27Completely rewrite how manuals are fetched and installedJune McEnroe
2020-12-14Update to man-pages-posix 2017-aJune McEnroe
2020-12-14Update to OpenBSD 6.8June McEnroe
2020-12-14Update to NetBSD 9.1June McEnroe
2020-12-14Update to man-pages 5.09June McEnroe
2020-12-14Update to FreeBSD 12.2June McEnroe
2020-06-08Update to OpenBSD 6.7June McEnroe
2020-05-04Add hack for macOS to search extra man sectionsJune McEnroe
2020-05-04Don't clear MANSECTJune McEnroe