def nextPriceCheck(self): if (self.currentIndex >= len(self.allKeys)): PriceCheck.updateAll(self.items) return key = int(self.allKeys[self.currentIndex]) log.info('Sending price check for %d', key) self.client.sendGlobalMessage(self.client.charname, '@pc %d' % key)
def nextPriceCheck(self): if (self.currentIndex >= len(self.allKeys)): PriceCheck.updateAll(self.items) return key = int(self.allKeys[self.currentIndex]) log.info('Sending price check for %d',key) self.client.sendGlobalMessage(self.client.charname, '@pc %d'%key)
def getMessage(self, message): if not (re1.match(message) or re2.match(message) or re3.match(message) or re4.match(message)): return key = int(self.allKeys[self.currentIndex]) if key not in self.items: self.items[key] = PriceCheck() pc = self.items[key] pc.content += [message] if (re2.match(message) or re3.match(message) or re4.match(message)): self.currentIndex += 1 self.client.addEvent(lambda: self.nextPriceCheck(), 0.1)
def getPriceChecks(self): return PriceCheck.getAll()