Ejemplo n.º 1
0
    def getFunnelURL(self):
        if patcherVer() == ['OFFLINE']:
            return
        if not patcherVer():
            patcherHTTP = HTTPClient()
            if checkParamFile() == None:
                patcherDoc = patcherHTTP.getDocument(URLSpec('http://download.toontown.com/english/currentVersion/content/patcher.ver'))
                vconGroup('w', self.cgRelease)
            else:
                patcherDoc = patcherHTTP.getDocument(URLSpec(checkParamFile()))
                vconGroup('w', self.cgBeta)
            rf = Ramfile()
            patcherDoc.downloadToRam(rf)
            self.patcherURL = rf.getData()
            if self.patcherURL.find('FUNNEL_LOG') == -1:
                patcherVer('w', 'OFFLINE')
                return
            self.patcherURL = self.patcherURL.split('\n')
            del rf
            del patcherDoc
            del patcherHTTP
            while self.patcherURL:
                self.confLine = self.patcherURL.pop()
                if self.confLine.find('FUNNEL_LOG=') != -1 and self.confLine.find('#FUNNEL_LOG=') == -1:
                    self.dynamicVRFunnel = self.confLine[11:].strip('\n')
                    patcherVer('w', self.confLine[11:].strip('\n'))

        else:
            self.dynamicVRFunnel = patcherVer()[0]
        return
    def getFunnelURL(self):
        if patcherVer() == ['OFFLINE']:
            return
        if patcherVer() == []:
            patcherHTTP = HTTPClient()
            if checkParamFile() == None:
                patcherDoc = patcherHTTP.getDocument(URLSpec('http://download.toontown.com/english/currentVersion/content/patcher.ver'))
                vconGroup('w', self.cgRelease)
            else:
                patcherDoc = patcherHTTP.getDocument(URLSpec(checkParamFile()))
                vconGroup('w', self.cgBeta)
            rf = Ramfile()
            patcherDoc.downloadToRam(rf)
            self.patcherURL = rf.getData()
            if self.patcherURL.find('FUNNEL_LOG') == -1:
                patcherVer('w', 'OFFLINE')
                return
            self.patcherURL = self.patcherURL.split('\n')
            del rf
            del patcherDoc
            del patcherHTTP
            while self.patcherURL:
                self.confLine = self.patcherURL.pop()
                if self.confLine.find('FUNNEL_LOG=') != -1 and self.confLine.find('#FUNNEL_LOG=') == -1:
                    self.dynamicVRFunnel = self.confLine[11:].strip('\n')
                    patcherVer('w', self.confLine[11:].strip('\n'))

        else:
            self.dynamicVRFunnel = patcherVer()[0]
        return
Ejemplo n.º 3
0
 def getFunnelURL(self):
     # print 'VRS URL: ' + self.dynamicVRFunnel
     if (patcherVer() == ['OFFLINE']):
         # print "Funnel System Offline"
         return
     if (patcherVer() == []):
         # print "Funnel URL not set. Setting now"
         patcherHTTP = HTTPClient()
         if checkParamFile() == None:
             patcherDoc = patcherHTTP.getDocument(
                 URLSpec(
                     'http://download.toontown.com/english/currentVersion/content/patcher.ver'
                 ))
             # Now set vcon (Content Group) to the Release string
             vconGroup('w', self.cgRelease)
         else:
             patcherDoc = patcherHTTP.getDocument(URLSpec(checkParamFile()))
             # Set vcon (Content Group) to the Beta string
             vconGroup('w', self.cgBeta)
         # patcherDoc = patcherHTTP.getDocument(URLSpec('http://build64:3120/english/currentVersion/dev/content/patcher.ver'))
         rf = Ramfile()
         patcherDoc.downloadToRam(rf)
         self.patcherURL = rf.getData()
         if self.patcherURL.find('FUNNEL_LOG') == -1:
             # The file did not download, need to set
             # the patcherVer to offline
             patcherVer('w', 'OFFLINE')
             # print 'Patcher system could not be reached'
             return
         self.patcherURL = self.patcherURL.split('\n')
         del rf, patcherDoc, patcherHTTP
         while self.patcherURL:
             self.confLine = self.patcherURL.pop()
             if (self.confLine.find('FUNNEL_LOG=') != -1
                     and self.confLine.find('#FUNNEL_LOG=') == -1):
                 self.dynamicVRFunnel = self.confLine[11:].strip('\n')
                 patcherVer('w', self.confLine[11:].strip('\n'))
     else:
         self.dynamicVRFunnel = patcherVer()[0]