diff options
author | Sadie Powell <sadie@witchery.services> | 2025-05-09 22:36:50 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-05-09 22:36:50 +0100 |
commit | eec428b0c7e6dd05c67df35d973b19cc1c2cf4b7 (patch) | |
tree | dbf608c85cd7686451affa3dbb486305941bf439 /modules/chanserv/cs_xop.cpp | |
parent | b706a6259eaeeed66fd17651e806d30432fc576e (diff) |
Build buffers a bit smarter in cs_access/cs_xop/help.
Diffstat (limited to 'modules/chanserv/cs_xop.cpp')
-rw-r--r-- | modules/chanserv/cs_xop.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/chanserv/cs_xop.cpp b/modules/chanserv/cs_xop.cpp index 8fa5b3bb2..bb38805f9 100644 --- a/modules/chanserv/cs_xop.cpp +++ b/modules/chanserv/cs_xop.cpp @@ -338,9 +338,8 @@ private: ++deleted; if (!nicks.empty()) - nicks += ", " + caccess->Mask(); - else - nicks = caccess->Mask(); + nicks += ", "; + nicks += caccess->Mask(); ci->EraseAccess(number - 1); FOREACH_MOD(OnAccessDel, (ci, source, caccess)); @@ -556,16 +555,18 @@ public: Anope::string buf; for (const auto &permission : permissions[cmd]) { - buf += ", " + permission; + if (!buf.empty()) + buf += ", "; + buf += permission; if (buf.length() > 75) { - source.Reply(" %s", buf.substr(2).c_str()); + source.Reply(" %s", buf.c_str()); buf.clear(); } } if (!buf.empty()) { - source.Reply(" %s", buf.substr(2).c_str()); + source.Reply(" %s", buf.c_str()); buf.clear(); } |