summaryrefslogtreecommitdiffstats
path: root/debian/patches/progress-linux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:51:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:51:47 +0000
commit9779c520fe559d8f10f9a6a809ad3336f4310075 (patch)
tree9e68c5c76510b2f19f4881a52bba8484bda1dfdd /debian/patches/progress-linux
parentAdding patch to fix pretty formatting in irk. (diff)
downloadirker-9779c520fe559d8f10f9a6a809ad3336f4310075.tar.xz
irker-9779c520fe559d8f10f9a6a809ad3336f4310075.zip
Adding patch from upstream to automatically split long lines.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/progress-linux')
-rw-r--r--debian/patches/progress-linux/0002-split-long-lines.patch24
1 files changed, 24 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)