diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-04-16 01:46:52 +0100 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-04-16 01:50:59 +0100 |
| commit | 74e9a9d2feb3690dc06a310e0477cd6f17e25fab (patch) | |
| tree | bfde58ac0c6babff941b29459b92e89c22cb9d76 /modules/botserv | |
| parent | d2aee394ea5bc91b132001fb5bf2457eec295432 (diff) | |
Automatically wrap the help output.
Diffstat (limited to 'modules/botserv')
| -rw-r--r-- | modules/botserv/bs_kick.cpp | 4 | ||||
| -rw-r--r-- | modules/botserv/bs_set.cpp | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/botserv/bs_kick.cpp b/modules/botserv/bs_kick.cpp index 80d8fc45d..97ca62d54 100644 --- a/modules/botserv/bs_kick.cpp +++ b/modules/botserv/bs_kick.cpp @@ -139,6 +139,7 @@ public: source.Reply(" "); source.Reply(_("Configures bot kickers. \037option\037 can be one of:")); + HelpWrapper help; Anope::string this_name = source.command; for (const auto &[c_name, info] : source.service->commands) { @@ -148,10 +149,11 @@ public: if (command) { source.command = c_name; - command->OnServHelp(source); + command->OnServHelp(source, help); } } } + help.SendTo(source); source.Reply(_( "Type \002%s\032\037option\037\002 for more information " diff --git a/modules/botserv/bs_set.cpp b/modules/botserv/bs_set.cpp index 4cce07b98..a7c6ba414 100644 --- a/modules/botserv/bs_set.cpp +++ b/modules/botserv/bs_set.cpp @@ -37,6 +37,8 @@ public: )); bool hide_privileged_commands = Config->GetBlock("options").Get<bool>("hideprivilegedcommands"), hide_registered_commands = Config->GetBlock("options").Get<bool>("hideregisteredcommands"); + + HelpWrapper help; Anope::string this_name = source.command; for (const auto &[c_name, info] : source.service->commands) { @@ -56,10 +58,12 @@ public: continue; source.command = c_name; - command->OnServHelp(source); + command->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()); |
