mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
relay: use [] as altchars for Base64 fallback
This ensures that mangled nicks can be reversed more easily (by removing leading _'s and replacing - with =)
This commit is contained in:
parent
886a98a396
commit
3d039b78e2
@ -150,7 +150,7 @@ def normalize_nick(irc, netname, nick, times_tagged=0, uid=''):
|
|||||||
# XXX: The decoded version of the nick is empty, YUCK!
|
# XXX: The decoded version of the nick is empty, YUCK!
|
||||||
# Base64 the nick for now, since (interestingly) we don't enforce UIDs to always be
|
# Base64 the nick for now, since (interestingly) we don't enforce UIDs to always be
|
||||||
# ASCII strings.
|
# ASCII strings.
|
||||||
nick = base64.b64encode(nick.encode(irc.encoding, 'replace'), altchars=b'-_')
|
nick = base64.b64encode(nick.encode(irc.encoding, 'replace'), altchars=b'[]')
|
||||||
nick = nick.decode()
|
nick = nick.decode()
|
||||||
|
|
||||||
# Normalize spaces to hyphens
|
# Normalize spaces to hyphens
|
||||||
|
Loading…
Reference in New Issue
Block a user