1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Build buffers a bit smarter in cs_access/cs_xop/help.

This commit is contained in:
Sadie Powell
2025-05-09 22:36:50 +01:00
parent b706a6259e
commit eec428b0c7
3 changed files with 18 additions and 16 deletions
+5 -3
View File
@@ -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();
}
}