summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-08-06 15:38:51 -0400
committerJune McEnroe <june@causal.agency>2022-08-06 15:38:51 -0400
commitc273621244156b351468e3c928387166b24f5ff4 (patch)
treec2cdc947877a2b2fe42375b7455dfbdea79887ec /handle.c
parentTrack prefix bits (diff)
downloadcatgirl-c273621244156b351468e3c928387166b24f5ff4.tar.gz
catgirl-c273621244156b351468e3c928387166b24f5ff4.zip
Don't use cached color to route away reply
Doesn't work when colors are disabled.
Diffstat (limited to '')
-rw-r--r--handle.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/handle.c b/handle.c
index f5e4f32..b8434c6 100644
--- a/handle.c
+++ b/handle.c
@@ -1216,12 +1216,7 @@ static void handleReplyEndOfWhowas(struct Message *msg) {
 static void handleReplyAway(struct Message *msg) {
 	require(msg, false, 3);
 	// Might be part of a WHOIS response.
-	uint id;
-	if (cacheGet(Network, msg->params[1])->color != Default) {
-		id = Network;
-	} else {
-		id = idFor(msg->params[1]);
-	}
+	uint id = (replies[ReplyWhois] ? Network : idFor(msg->params[1]));
 	uiFormat(
 		id, (id == Network ? Warm : Cold), tagTime(msg),
 		"\3%02d%s\3\tis away: %s",
a href='/catgirl/commit/ui.c?h=1.4&id=9a69869d392ca9ac9e2d845dec5f4dfecdbf3456&follow=1'>Add IRCDefault to colors enumJune McEnroe 2018-09-13Return a format->split even at the end of the stringJune McEnroe 2018-09-13Fix weird tab-complete after commaJune McEnroe 2018-09-13Rewrite UI againJune McEnroe 2018-09-12Add note about C-oJune McEnroe 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe