diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 870d440b5..0de652e28 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -7020,19 +7020,7 @@ void bot_subcommand_botgroup_create(Client *c, const Seperator *sep) return; } - bool extant_flag = false; - if (!database.botdb.QueryBotGroupExistence(botgroup_name, extant_flag)) { - c->Message( - Chat::White, - fmt::format( - "Failed to query bot-group existence for '{}'.", - botgroup_name - ).c_str() - ); - return; - } - - if (extant_flag) { + if (database.botdb.QueryBotGroupExistence(botgroup_name)) { c->Message( Chat::White, fmt::format( @@ -7360,8 +7348,7 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep) return; } - bool extant_flag = false; - if (!database.botdb.QueryBotGroupExistence(botgroup_name, extant_flag)) { + if (!database.botdb.QueryBotGroupExistence(botgroup_name)) { c->Message( Chat::White, fmt::format( @@ -7372,17 +7359,6 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep) return; } - if (!extant_flag) { - c->Message( - Chat::White, - fmt::format( - "Bot-group {} does not exist.", - botgroup_name - ).c_str() - ); - return; - } - auto* owner_group = c->GetGroup(); if (owner_group) { std::list member_list; diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 0ffa1b05f..464e0bd70 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -2328,7 +2328,7 @@ bool BotDatabase::SaveOwnerOption(const uint32 owner_id, const std::pair type, const std::pair flag); /* Bot bot-group functions */ - bool QueryBotGroupExistence(const std::string& botgroup_name, bool& extant_flag); + bool QueryBotGroupExistence(const std::string& botgroup_name); bool LoadBotGroupIDByBotGroupName(const std::string& botgroup_name, uint32& botgroup_id); bool LoadBotGroupIDByLeaderID(const uint32 leader_id, uint32& botgroup_id);