fix: account for server prefix in IRC line splitting

The 512-byte IRC limit includes the :nick!user@host prefix the server
prepends when relaying. Reserve 64 bytes for it and prefer splitting at
space boundaries instead of mid-word. Also strip the command prefix and
"Commands:" label from help output to keep the listing compact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-16 22:02:52 +01:00
parent eb37fef730
commit e8d803abe6
2 changed files with 14 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ async def cmd_help(bot, message):
k for k, v in bot.registry.commands.items()
if bot._plugin_allowed(v.plugin, channel)
)
await bot.reply(message, f"Commands: {', '.join(bot.prefix + n for n in names)}")
await bot.reply(message, ", ".join(names))
@command("version", help="Show bot version")