diff options
| author | 2024-08-31 16:21:09 +0100 | |
|---|---|---|
| committer | 2024-08-31 16:21:09 +0100 | |
| commit | f6da60b3f4e4bd05671cc3ad03200458a426b8e9 (patch) | |
| tree | 166ce25ba4204d8702206b1129d68b542b62476b /src/commands.cpp | |
| parent | Minor performance improvement to ProcessColors. (diff) | |
Normalise the case of MOD_RESULT variables.
Diffstat (limited to 'src/commands.cpp')
| -rw-r--r-- | src/commands.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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; |
