From 186c21c06697b9fbea7ae4e4a32290583b56ee1e Mon Sep 17 00:00:00 2001 From: Alcor Date: Fri, 8 May 2026 12:16:58 +0200 Subject: [PATCH 3/7] Display WALLOPS messages Special thanks to RektIRC for help with testing. --- handle.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/handle.c b/handle.c index 0b01de6..67159fa 100644 --- a/handle.c +++ b/handle.c @@ -739,6 +739,19 @@ 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); + 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 +1425,7 @@ static const struct Handler { { "QUIT", 0, handleQuit }, { "SETNAME", 0, handleSetname }, { "TOPIC", 0, handleTopic }, + { "WALLOPS", 0, handleWallops }, { "WARN", 0, handleStandardReply }, }; -- 2.47.3