From 0888104e28da8f691dddafd3d494df613fa94a87 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 15 May 2014 16:45:19 +0000 Subject: [PATCH] Filter: Make @uniud linear instead of quadratic. --- plugins/Filter/plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Filter/plugin.py b/plugins/Filter/plugin.py index 26e429ec3..1806d1d47 100644 --- a/plugins/Filter/plugin.py +++ b/plugins/Filter/plugin.py @@ -736,16 +736,16 @@ class Filter(callbacks.Plugin): tmp = self._uniudMap[c] if not len(tmp): tmp = u'\ufffd' - turned.insert(0, tmp) + turned.append(tmp) tlen += 1 elif c == '\t': tablen = 8 - tlen % 8 - turned.insert(0, ' ' * tablen) + turned.append(' ' * tablen) tlen += tablen elif ord(c) >= 32: - turned.insert(0, c) + turned.append(c) tlen += 1 - s = '%s \x02 \x02' % ''.join(turned) + s = '%s \x02 \x02' % ''.join(reversed(turned)) irc.reply(s) uniud = wrap(uniud, ['text']) Filter = internationalizeDocstring(Filter)