mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
Fix: 968 bug using lookup command with no parameters crashes instance (#970)
* Update SlashCommandHandler.cpp * Update SlashCommandHandler.cpp
This commit is contained in:
parent
ac5f08f601
commit
cdffd5ff30
@ -1199,7 +1199,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
EntityManager::Instance()->SerializeEntity(entity);
|
||||
}
|
||||
|
||||
if (chatCommand == "lookup" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER) {
|
||||
if (chatCommand == "lookup" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER && args.size() >= 1) {
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT `id`, `name` FROM `Objects` WHERE `displayName` LIKE ?1 OR `name` LIKE ?1 OR `description` LIKE ?1 LIMIT 50");
|
||||
// Concatenate all of the arguments into a single query so a multi word query can be used properly.
|
||||
|
Loading…
Reference in New Issue
Block a user