diff options
author | Adam <Adam@anope.org> | 2014-06-25 11:02:19 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-06-25 11:02:19 -0400 |
commit | ee3289029d61da12013e0f5a3e4faf2d07543a0e (patch) | |
tree | df7391c321a913fc56db2d075292c0a6ddb0536d /modules/commands/help.cpp | |
parent | fd9bb0ea7e3c8a39f1632c2ebbdc25d0fac192a0 (diff) |
Remove the rest of the 1.8 logic "let's write all of the command handler with no return statement!"
Fix if (something) else if (!something) tests
Remove returns at the bottom of void functions
Diffstat (limited to 'modules/commands/help.cpp')
-rw-r--r-- | modules/commands/help.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp index 4d8ee27bb..fc367760b 100644 --- a/modules/commands/help.cpp +++ b/modules/commands/help.cpp @@ -14,8 +14,6 @@ class CommandHelp : public Command { - static const unsigned help_wrap_len = 40; - static CommandGroup *FindGroup(const Anope::string &name) { for (unsigned i = 0; i < Config->CommandGroups.size(); ++i) @@ -108,20 +106,10 @@ class CommandHelp : public Command for (std::list<Anope::string>::iterator it2 = it->second.begin(), it2_end = it->second.end(); it2 != it2_end; ++it2) { const Anope::string &c_name = *it2; - buf += ", " + c_name; - - if (buf.length() > help_wrap_len) - { - source.Reply(" {0}", buf.substr(2)); - buf.clear(); - } } if (buf.length() > 2) - { source.Reply(" {0}", buf.substr(2)); - buf.clear(); - } } if (!groups.empty()) { @@ -156,6 +144,8 @@ class CommandHelp : public Command const Anope::string &subcommand = params.size() > max ? params[max] : ""; source.command = it->first; + + c->SendSyntax(source); if (!c->OnHelp(source, subcommand)) continue; |