summaryrefslogtreecommitdiff
path: root/modules/help.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-05-09 22:36:50 +0100
committerSadie Powell <sadie@witchery.services>2025-05-09 22:36:50 +0100
commiteec428b0c7e6dd05c67df35d973b19cc1c2cf4b7 (patch)
treedbf608c85cd7686451affa3dbb486305941bf439 /modules/help.cpp
parentb706a6259eaeeed66fd17651e806d30432fc576e (diff)
Build buffers a bit smarter in cs_access/cs_xop/help.
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();
}
}