From 9587cb0afb338b7f7a56b6c2eedada509c96f102 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 13 Mar 2013 12:09:58 +0100 Subject: [PATCH] Set variable "uncompressed" in WeeChat decoded message when compression is off (using message as-is) --- src/qweechat/weechat/protocol.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qweechat/weechat/protocol.py b/src/qweechat/weechat/protocol.py index c70b3fc..cdb6419 100644 --- a/src/qweechat/weechat/protocol.py +++ b/src/qweechat/weechat/protocol.py @@ -287,6 +287,8 @@ class Protocol: size_uncompressed = len(uncompressed) + 5 uncompressed = '%s%s%s' % (struct.pack('>i', size_uncompressed), struct.pack('b', 0), uncompressed) self.data = uncompressed + else: + uncompressed = self.data[:] # skip length and compression flag self.data = self.data[5:] # read id