diff --git a/toontown/rpc/ToontownRPCHandler.py b/toontown/rpc/ToontownRPCHandler.py index f1f94c8a..f5252f40 100755 --- a/toontown/rpc/ToontownRPCHandler.py +++ b/toontown/rpc/ToontownRPCHandler.py @@ -2,7 +2,7 @@ import datetime from direct.distributed.MsgTypes import CLIENTAGENT_EJECT from direct.distributed.PyDatagram import PyDatagram from direct.stdpy import threading2 -import re +import re, json from otp.distributed import OtpDoGlobals from toontown.distributed.ShardStatusReceiver import ShardStatusReceiver @@ -437,8 +437,14 @@ class ToontownRPCHandler(ToontownRPCHandlerBase): On success: 100000000 On failure: None """ - if str(userId) in self.air.csm.accountDB.dbm: - return int(self.air.csm.accountDB.dbm[str(userId)]) + response = executeHttpRequest('accountid', username=str(userId)) + if response is not None: + response = json.loads(response) + if response['success'] is True: + return str(response['accountId']) + else: + print response['error'] + return False @rpcmethod(accessLevel=MODERATOR) def rpc_getUserAvatars(self, userId): @@ -817,4 +823,4 @@ class ToontownRPCHandler(ToontownRPCHandlerBase): On failure: False """ return self.rpc_updateObject(accId, 'AccountUD', {'CHAT_SETTINGS': - [int(speedChatPlus), int(trueFriends)]}) \ No newline at end of file + [int(speedChatPlus), int(trueFriends)]})