summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-02 03:27:50 -0500
committerJune McEnroe <june@causal.agency>2020-02-02 03:27:50 -0500
commit8bb9ea7b7ff2e98bbe629f9f2e63f1dcb70250e3 (patch)
tree713c9916a5160ba96204844a8fd70799ded19072 /handle.c
parentImplement window switching and status line (diff)
downloadcatgirl-8bb9ea7b7ff2e98bbe629f9f2e63f1dcb70250e3.tar.gz
catgirl-8bb9ea7b7ff2e98bbe629f9f2e63f1dcb70250e3.zip
Add idColors
Diffstat (limited to '')
-rw-r--r--handle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/handle.c b/handle.c
index 609867e..f52f6f9 100644
--- a/handle.c
+++ b/handle.c
@@ -183,12 +183,13 @@ static void handleJoin(struct Message *msg) {
 	require(msg, true, 1);
 	size_t id = idFor(msg->params[0]);
 	if (self.nick && !strcmp(msg->nick, self.nick)) {
+		idColors[id] = hash(msg->params[0]);
 		uiShowID(id);
 	}
 	uiFormat(
 		id, Cold, tagTime(msg),
 		C"%02d%s"C" arrives in "C"%02d%s"C,
-		hash(msg->user), msg->nick, hash(idNames[id]), idNames[id]
+		hash(msg->user), msg->nick, idColors[id], idNames[id]
 	);
 }