summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scoop.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/scoop.c b/scoop.c
index a12b37b..7750a47 100644
--- a/scoop.c
+++ b/scoop.c
@@ -146,46 +146,52 @@ static void formatColor(bool group, struct Event e) {
 	}
 	printf("[%s] ", e.time);
 
-#define NICK "\33[%dm%s\33[m"
+#define C "\33[%dm"
+#define O "\33[m"
 	switch (e.type) {
 		break; case Privmsg: {
-			printf("<" NICK "> %s\n", color(e.user), e.nick, ansi(e.message));
+			printf(C "<%s>" O " %s\n", color(e.user), e.nick, ansi(e.message));
 		}
 		break; case Notice: {
-			printf("-" NICK "- %s\n", color(e.user), e.nick, ansi(e.message));
+			printf(C "-%s-" O " %s\n", color(e.user), e.nick, ansi(e.message));
 		}
 		break; case Action: {
-			printf("* " NICK " %s\n", color(e.user), e.nick, ansi(e.message));
+			printf(C "* %s" O " %s\n", color(e.user), e.nick, ansi(e.message));
 		}
 		break; case Join: {
-			printf(NICK " joined\n", color(e.user), e.nick);
+			printf(C "%s" O " joined\n", color(e.user), e.nick);
 		}
 		break; case Part: {
-			printf(NICK " parted: %s\n", color(e.user), e.nick, ansi(e.message));
+			printf(
+				C "%s" O " parted: %s\n", color(e.user), e.nick, ansi(e.message)
+			);
 		}
 		break; case Quit: {
-			printf(NICK " quit: %s\n", color(e.user), e.nick, ansi(e.message));
+			printf(
+				C "%s" O " quit: %s\n", color(e.user), e.nick, ansi(e.message)
+			);
 		}
 		break; case Kick: {
 			printf(
-				NICK " kicked %s: %s\n",
+				C "%s" O " kicked %s: %s\n",
 				color(e.user), e.nick, e.target, ansi(e.message)
 			);
 		}
 		break; case Nick: {
 			printf(
-				NICK " changed nick to " NICK "\n",
+				C "%s" O " changed nick to " C "%s" O "\n",
 				color(e.user), e.nick, color(e.user), e.target
 			);
 		}
 		break; case Topic: {
 			printf(
-				NICK "set the topic: %s\n",
+				C "%s" O " set the topic: %s\n",
 				color(e.user), e.nick, ansi(e.message)
 			);
 		}
 	}
-#undef NICK
+#undef C
+#undef O
 }
 
 static void formatIRC(bool group, struct Event e) {
/libretls/commit/tls.c?h=3.8.1&id=15afbfa70cb6102c3c7ef0cecc6e83cb1730909b&follow=1'>tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe