From 5c10dc8bac525c91db2960f66c7319d578e3cc7a Mon Sep 17 00:00:00 2001
From: Alcor <alcor@tilde.club>
Date: Fri, 8 May 2026 12:16:58 +0200
Subject: [PATCH 08/19] Display WALLOPS messages (v2)

Special thanks to RektIRC for help with testing.
---
 handle.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/handle.c b/handle.c
index 0b01de6..e8607c5 100644
--- a/handle.c
+++ b/handle.c
@@ -739,6 +739,20 @@ log:
 	urlScan(id, msg->nick, msg->params[1]);
 }
 
+static void handleWallops(struct Message *msg) {
+	require(msg, true, 1);
+	enum Heat heat = filterCheck(Warm, Network, msg);
+	enum Color color = hash(msg->user);
+	urlScan(Network, msg->nick, msg->params[0]);
+	completePush(Network, msg->nick, color);
+	uiFormat(
+		Network, heat, tagTime(msg),
+		"\3%d!%s!\3\t%s",
+		color, msg->nick, msg->params[0]
+	);
+	logFormat(Network, tagTime(msg), "!%s! %s", msg->nick, msg->params[0]);
+}
+
 static const char *UserModes[256] = {
 	['O'] = "local oper",
 	['i'] = "invisible",
@@ -1412,6 +1426,7 @@ static const struct Handler {
 	{ "QUIT", 0, handleQuit },
 	{ "SETNAME", 0, handleSetname },
 	{ "TOPIC", 0, handleTopic },
+	{ "WALLOPS", 0, handleWallops },
 	{ "WARN", 0, handleStandardReply },
 };
 
-- 
2.47.3

