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:
+5
-3
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user