mirror of
https://github.com/anope/anope.git
synced 2026-07-04 04:43:13 +02:00
Automatically wrap the help output.
This commit is contained in:
@@ -39,6 +39,8 @@ public:
|
||||
Anope::string this_name = source.command;
|
||||
bool hide_privileged_commands = Config->GetBlock("options").Get<bool>("hideprivilegedcommands"),
|
||||
hide_registered_commands = Config->GetBlock("options").Get<bool>("hideregisteredcommands");
|
||||
|
||||
HelpWrapper help;
|
||||
for (const auto &[c_name, info] : source.service->commands)
|
||||
{
|
||||
if (c_name.find_ci(this_name + " ") == 0)
|
||||
@@ -57,9 +59,11 @@ public:
|
||||
continue;
|
||||
|
||||
source.command = c_name;
|
||||
c->OnServHelp(source);
|
||||
c->OnServHelp(source, help);
|
||||
}
|
||||
}
|
||||
help.SendTo(source);
|
||||
|
||||
source.Reply(_("Type \002%s\032\037option\037\002 for more information on a particular option."),
|
||||
source.service->GetQueryCommand("generic/help", this_name).c_str());
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user