Core/ChatCommands: make ExactSequence more readable
(cherry picked from commit feaaa595cae735bb6093b24a88562c27b2723cfe)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user