about summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2025-10-28 20:13:48 -0400
committerJune McEnroe <june@causal.agency>2025-10-28 20:13:48 -0400
commiteb82baab2571dc46e70b0c0d9ec6069a506bedd5 (patch)
treea6382f60d75f17c2af37be52e54e1d1de67c9e95 /handle.c
parentAdd a testimonial (diff)
downloadcatgirl-eb82baab2571dc46e70b0c0d9ec6069a506bedd5.tar.gz
catgirl-eb82baab2571dc46e70b0c0d9ec6069a506bedd5.zip
Add /motd command
You've gotta be able to see the fun colour charts again.
Diffstat (limited to '')
-rw-r--r--handle.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/handle.c b/handle.c
index 0cc7c04..0b01de6 100644
--- a/handle.c
+++ b/handle.c
@@ -343,16 +343,12 @@ static void handleReplyMOTD(struct Message *msg) {
 	char *line = msg->params[1];
 	urlScan(Network, NULL, line);
 	if (!strncmp(line, "- ", 2)) {
-		uiFormat(Network, Cold, tagTime(msg), "\3%d-\3\t%s", Gray, &line[2]);
+		uiFormat(Network, Warm, tagTime(msg), "\3%d-\3\t%s", Gray, &line[2]);
 	} else {
-		uiFormat(Network, Cold, tagTime(msg), "%s", line);
+		uiFormat(Network, Warm, tagTime(msg), "%s", line);
 	}
 }
 
-static void handleErrorNoMOTD(struct Message *msg) {
-	(void)msg;
-}
-
 static void handleReplyHelp(struct Message *msg) {
 	require(msg, false, 3);
 	urlScan(Network, NULL, msg->params[2]);
@@ -1378,10 +1374,11 @@ static const struct Handler {
 	{ "367", +ReplyBan, handleReplyBanList },
 	{ "368", -ReplyBan, NULL },
 	{ "369", -ReplyWhowas, handleReplyEndOfWhowas },
-	{ "372", 0, handleReplyMOTD },
+	{ "372", +ReplyMOTD, handleReplyMOTD },
+	{ "376", -ReplyMOTD, NULL },
 	{ "378", +ReplyWhois, handleReplyWhoisGeneric },
 	{ "379", +ReplyWhois, handleReplyWhoisGeneric },
-	{ "422", 0, handleErrorNoMOTD },
+	{ "422", -ReplyMOTD, NULL },
 	{ "432", 0, handleErrorErroneousNickname },
 	{ "433", 0, handleErrorNicknameInUse },
 	{ "437", 0, handleErrorNicknameInUse },