From 58e1d5b4e2fabead1aae356dd060bfc9748bdd5e Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 8 Feb 2020 00:01:59 -0500 Subject: Handle NICK --- handle.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'handle.c') diff --git a/handle.c b/handle.c index b73d200..fe64f33 100644 --- a/handle.c +++ b/handle.c @@ -261,6 +261,22 @@ static void handleTopic(struct Message *msg) { } } +static void handleNick(struct Message *msg) { + require(msg, true, 1); + if (self.nick && !strcmp(msg->nick, self.nick)) { + set(&self.nick, msg->params[0]); + } + size_t id; + completeReplace(None, msg->nick, msg->params[0]); + while (None != (id = completeID(msg->params[0]))) { + uiFormat( + id, Cold, tagTime(msg), + "\3%02d%s\3\tis now known as \3%02d%s\3", + hash(msg->user), msg->nick, hash(msg->user), msg->params[0] + ); + } +} + static bool isAction(struct Message *msg) { if (strncmp(msg->params[1], "\1ACTION ", 8)) return false; msg->params[1] += 8; @@ -354,6 +370,7 @@ static const struct Handler { { "CAP", handleCap }, { "ERROR", handleError }, { "JOIN", handleJoin }, + { "NICK", handleNick }, { "NOTICE", handlePrivmsg }, { "PART", handlePart }, { "PING", handlePing }, -- cgit 1.4.0 n/tree/POSIX/Makefile?h=2063.9&id=9058456156086388fc737852e6f7ae4c0e04a72e'>tree commit diff
path: root/POSIX/Makefile (unfollow)
Commit message (Expand)Author
2022-05-08Update to OpenBSD 7.1 2062.73June McEnroe
2021-10-15Update to OpenBSD 7.0 2062.63June McEnroe
2021-08-29Update to Linux man-pages 5.13 2062.53Štěpán Němec
2021-08-26Update to NetBSD 9.2 2062.52June McEnroe
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