diff --git a/world/client.cpp b/world/client.cpp index eedec66d5..141663ea0 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -643,11 +643,9 @@ bool Client::HandleGenerateRandomNamePacket(const EQApplicationPacket *app) { if (len < 10) newName[len++] = c; } - std::string query = StringFormat("SELECT `name` FROM `character_data` WHERE `name` = '%s'", newName); - auto res = database.QueryDatabase(query); - if (!res.Success() || res.RowCount() == 0) { - unique = true; - } + if (!database.CheckNameFilter(newName) && !database.ReserveName(GetAccountID(), newName)) { + unique = true; + } } NameGeneration_Struct* ngs = (NameGeneration_Struct*)app->pBuffer;