summary refs log tree commit diff
path: root/litterbox.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-13 18:01:05 -0500
committerJune McEnroe <june@causal.agency>2020-12-13 18:55:23 -0500
commit93507ad30249e63a29e6eb3289f7cb8c1cf0d90b (patch)
tree7d3fb71d3af970aa0d39eddade080bc63ba60ff1 /litterbox.c
parentDirectly output IRC-to-ANSI conversion (diff)
downloadlitterbox-93507ad30249e63a29e6eb3289f7cb8c1cf0d90b.tar.gz
litterbox-93507ad30249e63a29e6eb3289f7cb8c1cf0d90b.zip
Use nick for color if user is "*"
Not accurate but better than every message being the same color in
imported logs.
Diffstat (limited to 'litterbox.c')
-rw-r--r--litterbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/litterbox.c b/litterbox.c
index 5a88132..c3bc46e 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -313,6 +313,7 @@ static void querySearch(struct Message *msg) {
 		const char *message = (const char *)sqlite3_column_text(stmt, i++);
 		if (!target) target = "";
 		if (!message) message = "";
+		if (!strcmp(user, "*")) user = nick;
 
 		format("NOTICE %s :(%s) [%s] ", msg->nick, context, time);
 		switch (type) {