diff --git a/deployment/toontown/uberdog/ServiceStart.py b/deployment/toontown/uberdog/ServiceStart.py index 5c48e920..bce3f3e8 100644 --- a/deployment/toontown/uberdog/ServiceStart.py +++ b/deployment/toontown/uberdog/ServiceStart.py @@ -50,6 +50,11 @@ if ':' in host: port = int(port) simbase.air.connect(host, port) +isServer = config.GetBool('is-server', False) + +if isServer: + import datetime + try: run() except SystemExit: @@ -57,4 +62,9 @@ except SystemExit: except Exception: info = describeException() simbase.air.writeServerEvent('uberdog-exception', simbase.air.getAvatarIdFromSender(), simbase.air.getAccountIdFromSender(), info) - raise + + if isServer: + with open(config.GetString('ud-crash-log-name', '/opt/var/log/Uberdog-crash-%s.txt' % (datetime.datetime.now())), 'w+') as file: + file.write(info + "\n") + + raise \ No newline at end of file diff --git a/toontown/distributed/ToontownInternalRepository.py b/toontown/distributed/ToontownInternalRepository.py index 327292d2..78566901 100755 --- a/toontown/distributed/ToontownInternalRepository.py +++ b/toontown/distributed/ToontownInternalRepository.py @@ -4,6 +4,7 @@ from toontown.distributed.ToontownNetMessengerAI import ToontownNetMessengerAI from direct.distributed.PyDatagram import PyDatagram import traceback import sys +import urlparse class ToontownInternalRepository(AstronInternalRepository): GameGlobalsId = OTP_DO_ID_TOONTOWN