summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/progress-linux/0002-split-long-lines.patch24
-rw-r--r--debian/patches/series1
2 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/progress-linux/0002-split-long-lines.patch b/debian/patches/progress-linux/0002-split-long-lines.patch
new file mode 100644
index 0000000..91fe23d
--- /dev/null
+++ b/debian/patches/progress-linux/0002-split-long-lines.patch
@@ -0,0 +1,24 @@
+Author: Eric S. Raymond <esr@thyrsus.com>
+Description: Automatically split long lines in irk.
+
+diff -Naurp irker.orig/irk irker/irk
+--- irker.orig/irk
++++ irker/irk
+@@ -39,10 +39,15 @@ def irk(target, message, server = DEFAUL
+ def main():
+ target = sys.argv[1]
+ message = " ".join(sys.argv[2:])
+- message = message.decode('string_escape')
++ if str == bytes:
++ message = message.decode('string_escape')
+
++ # The actual IRC limit is 512. Avoid any off-by-ones
++ chunksize = 511
+ try:
+- irk(target, message)
++ while message[:chunksize]:
++ irk(target, message[:chunksize])
++ message = message[chunksize:]
+ except socket.error as e:
+ sys.stderr.write("irk: write to server failed: %r\n" % e)
+ sys.exit(1)
diff --git a/debian/patches/series b/debian/patches/series
index ff9a078..9ea6acc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
0013-Fix-incorrect-name-in-Makefile.patch
0011-Import-upstream-tweaks-to-irkerd.service.patch
progress-linux/0001-message-decode.patch
+progress-linux/0002-split-long-lines.patch