Fix backwards name check (#1327)

Untested.  Fixes not being able to rename a character at character create
This commit is contained in:
David Markowitz 2023-11-29 00:25:06 -08:00 committed by GitHub
parent de0b560a8c
commit 62a1e135c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,7 +405,7 @@ void UserManager::RenameCharacter(const SystemAddress& sysAddr, Packet* packet)
return; return;
} }
if (Database::Get()->GetCharacterInfo(newName)) { if (!Database::Get()->GetCharacterInfo(newName)) {
if (IsNamePreapproved(newName)) { if (IsNamePreapproved(newName)) {
Database::Get()->SetCharacterName(charID, newName); Database::Get()->SetCharacterName(charID, newName);
LOG("Character %s now known as %s", character->GetName().c_str(), newName.c_str()); LOG("Character %s now known as %s", character->GetName().c_str(), newName.c_str());