diff --git a/o2_botcmd.py b/o2_botcmd.py index 110e559..0367cea 100644 --- a/o2_botcmd.py +++ b/o2_botcmd.py @@ -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]: