1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 08:03:13 +02:00

Allow Command::FindCommandFromService to skip hidden commands.

This commit is contained in:
Sadie Powell
2026-03-11 05:44:48 +00:00
parent fa5bb3f1bf
commit 22a1924bfd
8 changed files with 15 additions and 12 deletions
+7 -4
View File
@@ -364,9 +364,10 @@ bool Command::Run(CommandSource &source, const Anope::string &cmdname, const Com
return true;
}
bool Command::FindCommandFromService(const Anope::string &command_service, BotInfo *&bot, Anope::string &name)
bool Command::FindFromService(const Anope::string &command_service, BotInfo *&bot, Anope::string &name)
{
bot = NULL;
bot = nullptr;
name.clear();
for (const auto &[_, bi] : *BotListByNick)
{
@@ -377,9 +378,11 @@ bool Command::FindCommandFromService(const Anope::string &command_service, BotIn
bot = bi;
name = c_name;
return true;
if (!info.hide)
return true;
}
}
return false;
return name.empty();
}