summaryrefslogtreecommitdiff
path: root/modules/help.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/help.cpp')
-rw-r--r--modules/help.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/help.cpp b/modules/help.cpp
index 9fae2d43f..7b49764b9 100644
--- a/modules/help.cpp
+++ b/modules/help.cpp
@@ -102,17 +102,19 @@ public:
Anope::string buf;
for (const auto &c_name : cmds)
{
- buf += ", " + c_name;
+ if (!buf.empty())
+ buf += ", ";
+ buf += c_name;
if (buf.length() > help_wrap_len)
{
- source.Reply(" %s", buf.substr(2).c_str());
+ source.Reply(" %s", buf.c_str());
buf.clear();
}
}
if (buf.length() > 2)
{
- source.Reply(" %s", buf.substr(2).c_str());
+ source.Reply(" %s", buf.c_str());
buf.clear();
}
}