Skip to content

Commit

Permalink
Filter: Make @Uniud linear instead of quadratic.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed May 15, 2014
1 parent d6740bf commit 0888104
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/Filter/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,16 +736,16 @@ def uniud(self, irc, msg, args, text):
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)
Expand Down

0 comments on commit 0888104

Please sign in to comment.