mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-10-26 19:01:44 -04:00
Fixed missing byteorder spec in nick color conversion for old snakes
This commit is contained in:
parent
8d6cf7bc54
commit
9977e310f8
1 changed files with 1 additions and 1 deletions
|
|
@ -1232,7 +1232,7 @@ def get_nick_color(sender_hash, theme, app, shift=15):
|
|||
try: sender_hash = sender_hash.encode("utf-8")
|
||||
except: pass
|
||||
if not type(sender_hash) == bytes: return theme["nick_peer"]
|
||||
return nick_colors[(int.from_bytes(sender_hash)+shift)%len(nick_colors)]
|
||||
return nick_colors[(int.from_bytes(sender_hash, "big")+shift)%len(nick_colors)]
|
||||
|
||||
room_nick_src_cache = {}
|
||||
def get_nick_src(hub, room, nick):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue