From 7e5d56290d542bbb3880653bbb440b9429baa078 Mon Sep 17 00:00:00 2001 From: Test_User Date: Mon, 6 May 2024 21:09:01 -0400 Subject: And the forgotten spam recursion check --- commands.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commands.c b/commands.c index 2cff22d..7016d04 100644 --- a/commands.c +++ b/commands.c @@ -184,6 +184,14 @@ int spam_command(struct string sender, struct string original_message, struct st return 0; } + + if (cmd->func == spam_command) { + SEND(STRING(":1HC000000 NOTICE ")); + SEND(to); + SEND(STRING(" :Spam recursion is not allowed. The limit is for your own sake, please do not violate it.\n")); + + return 0; + } } } else { SEND(STRING(":1HC000000 NOTICE ")); -- cgit v1.2.3