mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Filter: Make @uniud linear instead of quadratic.
This commit is contained in:
parent
d6740bfb20
commit
0888104e28
@ -736,16 +736,16 @@ class Filter(callbacks.Plugin):
|
|||||||
tmp = self._uniudMap[c]
|
tmp = self._uniudMap[c]
|
||||||
if not len(tmp):
|
if not len(tmp):
|
||||||
tmp = u'\ufffd'
|
tmp = u'\ufffd'
|
||||||
turned.insert(0, tmp)
|
turned.append(tmp)
|
||||||
tlen += 1
|
tlen += 1
|
||||||
elif c == '\t':
|
elif c == '\t':
|
||||||
tablen = 8 - tlen % 8
|
tablen = 8 - tlen % 8
|
||||||
turned.insert(0, ' ' * tablen)
|
turned.append(' ' * tablen)
|
||||||
tlen += tablen
|
tlen += tablen
|
||||||
elif ord(c) >= 32:
|
elif ord(c) >= 32:
|
||||||
turned.insert(0, c)
|
turned.append(c)
|
||||||
tlen += 1
|
tlen += 1
|
||||||
s = '%s \x02 \x02' % ''.join(turned)
|
s = '%s \x02 \x02' % ''.join(reversed(turned))
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
uniud = wrap(uniud, ['text'])
|
uniud = wrap(uniud, ['text'])
|
||||||
Filter = internationalizeDocstring(Filter)
|
Filter = internationalizeDocstring(Filter)
|
||||||
|
Loading…
Reference in New Issue
Block a user