Core/ChatCommands: make ExactSequence more readable

(cherry picked from commit feaaa595cae735bb6093b24a88562c27b2723cfe)
This commit is contained in:
Treeston
2022-02-05 21:29:53 +01:00
committed by Shauren
parent bdd4ccbd78
commit 013c9b2cb7
10 changed files with 54 additions and 45 deletions
+2 -2
View File
@@ -205,7 +205,7 @@ public:
}
// Enable/Disable accepting whispers (for GM)
static bool HandleWhispersCommand(ChatHandler* handler, Optional<Variant<bool, ExactSequence<'r', 'e', 'm', 'o', 'v', 'e'>>> operationArg, Optional<std::string> playerNameArg)
static bool HandleWhispersCommand(ChatHandler* handler, Optional<Variant<bool, EXACT_SEQUENCE("remove")>> operationArg, Optional<std::string> playerNameArg)
{
if (!operationArg)
{
@@ -231,7 +231,7 @@ public:
}
}
if (operationArg->holds_alternative<ExactSequence<'r', 'e', 'm', 'o', 'v', 'e'>>())
if (operationArg->holds_alternative<EXACT_SEQUENCE("remove")>())
{
if (!playerNameArg)
return false;