From 8b85de2b2a0185992780feb8c1b26d0919756420 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 24 Apr 2021 23:50:52 +0000 Subject: [PATCH] Limit reply length so bot doesn't get kicked --- mosfet/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mosfet/commands.py b/mosfet/commands.py index 17fa8ca..c65e6fe 100644 --- a/mosfet/commands.py +++ b/mosfet/commands.py @@ -520,7 +520,11 @@ class Commands: pass if reply: - print(reply) + print('Reply:', reply) + + if len(reply) >= 256: + reply = 'reply too long, check console' + if private and not reply.startswith('/'): self.g.chat.send('/m ' + sender + ' ' + reply) else: