Fix bytestrings not getting decoded to strings when modifying trusted list
This commit is contained in:
parent
4ee71a6d4a
commit
cdddf8fd65
|
@ -99,6 +99,9 @@ loadmessages()
|
||||||
|
|
||||||
def addtrusted(chan, account):
|
def addtrusted(chan, account):
|
||||||
global trusted, trustedlock
|
global trusted, trustedlock
|
||||||
|
|
||||||
|
if type(chan) != str: chan = chan.decode()
|
||||||
|
if type(account) != str: account = account.decode()
|
||||||
|
|
||||||
trustedlock.acquire()
|
trustedlock.acquire()
|
||||||
|
|
||||||
|
@ -113,6 +116,9 @@ def addtrusted(chan, account):
|
||||||
def rmtrusted(chan, account):
|
def rmtrusted(chan, account):
|
||||||
global trusted, trustedlock
|
global trusted, trustedlock
|
||||||
|
|
||||||
|
if type(chan) != str: chan = chan.decode()
|
||||||
|
if type(account) != str: account = account.decode()
|
||||||
|
|
||||||
trustedlock.acquire()
|
trustedlock.acquire()
|
||||||
|
|
||||||
if chan in trusted and account in trusted[chan]:
|
if chan in trusted and account in trusted[chan]:
|
||||||
|
|
Loading…
Reference in New Issue