From ef8d2534fb19b41163196b65b26b13d426768f65 Mon Sep 17 00:00:00 2001 From: paulwalko Date: Wed, 27 Dec 2017 03:07:48 -0500 Subject: [PATCH] undo split messages --- irc.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/irc.py b/irc.py index 200eab5..1dadc52 100755 --- a/irc.py +++ b/irc.py @@ -185,19 +185,6 @@ class Bot(asynchat.async_chat): except UnicodeEncodeError as e: return - # Split long messages - maxlength = 430 - if len(text) > maxlength: - first_message = text[0:maxlength].decode('utf-8','ignore') - line_break = len(first_message) - for i in range(len(first_message)-1,-1,-1): - if first_message[i] == " ": - line_break = i - break - self.msg(recipient, text.decode('utf-8','ignore')[0:line_break]) - self.msg(recipient, text.decode('utf-8','ignore')[line_break+1:]) - return - # No messages within the last 3 seconds? Go ahead! # Otherwise, wait so it's been at least 0.8 seconds + penalty if self.stack: