From f6da60b3f4e4bd05671cc3ad03200458a426b8e9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 31 Aug 2024 16:21:09 +0100 Subject: Normalise the case of MOD_RESULT variables. --- src/commands.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 5efd37738..3c500e9b8 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -183,9 +183,9 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman if (!handler) { - ModResult MOD_RESULT; - FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, command_p, user, false)); - if (MOD_RESULT == MOD_RES_DENY) + ModResult modres; + FIRST_MOD_RESULT(OnPreCommand, modres, (command, command_p, user, false)); + if (modres == MOD_RES_DENY) { FOREACH_MOD(OnCommandBlocked, (command, command_p, user)); return; @@ -242,9 +242,9 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman * We call OnPreCommand here separately if the command exists, so the magic above can * truncate to max_params if necessary. -- w00t */ - ModResult MOD_RESULT; - FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, command_p, user, false)); - if (MOD_RESULT == MOD_RES_DENY) + ModResult modres; + FIRST_MOD_RESULT(OnPreCommand, modres, (command, command_p, user, false)); + if (modres == MOD_RES_DENY) { FOREACH_MOD(OnCommandBlocked, (command, command_p, user)); return; @@ -313,8 +313,8 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman handler->use_count++; /* module calls too */ - FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, command_p, user, true)); - if (MOD_RESULT == MOD_RES_DENY) + FIRST_MOD_RESULT(OnPreCommand, modres, (command, command_p, user, true)); + if (modres == MOD_RES_DENY) { FOREACH_MOD(OnCommandBlocked, (command, command_p, user)); return; -- cgit v1.3.1-10-gc9f91