From eec428b0c7e6dd05c67df35d973b19cc1c2cf4b7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 9 May 2025 22:36:50 +0100 Subject: Build buffers a bit smarter in cs_access/cs_xop/help. --- modules/help.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/help.cpp') 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(); } } -- cgit