mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Slash commands: Update compares (#1270)
use case insensitive compare use character name for kill instead of account name Use correct Id for muting when a player is found
This commit is contained in:
@@ -448,9 +448,8 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
if (chatCommand == "kill" && args.size() == 1 && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Brutally murdering that player, if online on this server.");
|
||||
|
||||
auto* user = UserManager::Instance()->GetUser(args[0]);
|
||||
if (user) {
|
||||
auto* player = Game::entityManager->GetEntity(user->GetLoggedInChar());
|
||||
auto* player = Player::GetPlayer(args[0]);
|
||||
if (player) {
|
||||
player->Smash(entity->GetObjectID());
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"It has been done, do you feel good about yourself now?");
|
||||
return;
|
||||
@@ -1042,7 +1041,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
}
|
||||
} else {
|
||||
accountId = player->GetParentUser()->GetAccountID();
|
||||
characterId = player->GetCharacter()->GetID();
|
||||
characterId = player->GetObjectID();
|
||||
}
|
||||
|
||||
auto* userUpdate = Database::CreatePreppedStmt("UPDATE accounts SET mute_expire = ? WHERE id = ?;");
|
||||
|
Reference in New Issue
Block a user