summaryrefslogtreecommitdiff
path: root/modules/commands/help.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-06-25 11:02:19 -0400
committerAdam <Adam@anope.org>2014-06-25 11:02:19 -0400
commitee3289029d61da12013e0f5a3e4faf2d07543a0e (patch)
treedf7391c321a913fc56db2d075292c0a6ddb0536d /modules/commands/help.cpp
parentfd9bb0ea7e3c8a39f1632c2ebbdc25d0fac192a0 (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.cpp14
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;