Fix bytestrings not getting decoded to strings when modifying trusted list

This commit is contained in:
Juhani Krekelä 2021-05-25 23:19:08 +03:00
parent 4ee71a6d4a
commit cdddf8fd65
1 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,9 @@ loadmessages()
def addtrusted(chan, account):
global trusted, trustedlock
if type(chan) != str: chan = chan.decode()
if type(account) != str: account = account.decode()
trustedlock.acquire()
@ -113,6 +116,9 @@ def addtrusted(chan, account):
def rmtrusted(chan, account):
global trusted, trustedlock
if type(chan) != str: chan = chan.decode()
if type(account) != str: account = account.decode()
trustedlock.acquire()
if chan in trusted and account in trusted[chan]: