only save command if it is a GM command

This commit is contained in:
David Markowitz 2024-04-03 04:00:07 -07:00
parent cc274adf6c
commit 02847c6849

View File

@ -121,7 +121,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& chat, Entity*
if (commandItr != RegisteredCommands.end()) {
auto& [alias, commandHandle] = *commandItr;
if (entity->GetGMLevel() >= commandHandle.requiredLevel) {
Database::Get()->InsertSlashCommandUsage(entity->GetObjectID(), input);
if (commandHandle.requiredLevel > eGameMasterLevel::CIVILIAN) Database::Get()->InsertSlashCommandUsage(entity->GetObjectID(), input);
commandHandle.handle(entity, sysAddr, args);
} else {
// We don't need to tell civilians they aren't high enough level