Update TTWhiteList.py

This commit is contained in:
Open Toontown 2022-01-19 22:45:39 -05:00
parent e3d2edb4bc
commit df95510043

View file

@ -1,6 +1,6 @@
import os import os
import datetime import datetime
from pandac.PandaModules import * from panda3d.core import *
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject from direct.distributed import DistributedObject
from otp.chat.WhiteList import WhiteList from otp.chat.WhiteList import WhiteList
@ -8,10 +8,10 @@ from toontown.toonbase import TTLocalizer
class TTWhiteList(WhiteList, DistributedObject.DistributedObject): class TTWhiteList(WhiteList, DistributedObject.DistributedObject):
RedownloadTaskName = 'RedownloadWhitelistTask' RedownloadTaskName = 'RedownloadWhitelistTask'
WhitelistBaseDir = config.GetString('whitelist-base-dir', '') WhitelistBaseDir = ConfigVariableString('whitelist-base-dir', '').value
WhitelistStageDir = config.GetString('whitelist-stage-dir', 'whitelist') WhitelistStageDir = ConfigVariableString('whitelist-stage-dir', 'whitelist').value
WhitelistOverHttp = config.GetBool('whitelist-over-http', True) WhitelistOverHttp = ConfigVariableBool('whitelist-over-http', True).value
WhitelistFileName = config.GetString('whitelist-filename', 'twhitelist.dat') WhitelistFileName = ConfigVariableString('whitelist-filename', 'twhitelist.dat').value
def __init__(self): def __init__(self):
self.redownloadingWhitelist = False self.redownloadingWhitelist = False
@ -72,8 +72,8 @@ class TTWhiteList(WhiteList, DistributedObject.DistributedObject):
self.updateWhitelist() self.updateWhitelist()
def getWhitelistUrl(self): def getWhitelistUrl(self):
result = base.config.GetString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/') result = ConfigVariableString('fallback-whitelist-url', 'http://cdn.toontown.disney.go.com/toontown/en/').value
override = base.config.GetString('whitelist-url', '') override = ConfigVariableString('whitelist-url', '').value
if override: if override:
self.notify.info('got an override url, using %s for the whitelist' % override) self.notify.info('got an override url, using %s for the whitelist' % override)
result = override result = override