mirror of
https://github.com/anope/anope.git
synced 2026-06-25 19:16:37 +02:00
When a command is missing in GetQueryCommand just return (MISSING).
This commit is contained in:
+4
-3
@@ -311,7 +311,7 @@ Anope::string BotInfo::GetQueryCommand(const Anope::string &command, const Anope
|
||||
|
||||
if (!command.empty())
|
||||
{
|
||||
Anope::string actual_command = "\036(MISSING)\036";
|
||||
Anope::string actual_command;
|
||||
for (const auto &[c_name, info] : this->commands)
|
||||
{
|
||||
if (info.name != command)
|
||||
@@ -322,8 +322,9 @@ Anope::string BotInfo::GetQueryCommand(const Anope::string &command, const Anope
|
||||
break; // Keep going to find a non-hidden alternative.
|
||||
}
|
||||
|
||||
if (!actual_command.empty())
|
||||
buf.append(" ").append(actual_command);
|
||||
if (actual_command.empty())
|
||||
return "\036(MISSING)\036";
|
||||
buf.append(" ").append(actual_command);
|
||||
}
|
||||
|
||||
if (!extra.empty())
|
||||
|
||||
Reference in New Issue
Block a user