such map [%s]" % (mapcode)) elif self.room.isTesting: mapxml=self.room.editeurMap self.sendNewPartyCustomMap(mapxml, "-", 0) else: self.sendNewParty() if self.room.currentWorld==888: self.sendTime(60) if self.room.isBootcamp: self.sendTime(360) else: self.sendTime(120) if self.room.isSandbox: self.sendTime(0) self.sendPlayerList() shamanCode = self.room.getShamanCode() double = False if self.room.name=="801": self.sendShamanCode(0) elif self.room.everybodyIsShaman: self.sendShamanCode(self.playerCode) elif self.room.nobodyIsShaman: self.sendShamanCode(0) shamanCode = 0 elif self.room.currentWorld in [108, 109]: self.catchTheCheeseNoShaman(shamanCode) elif self.room.currentWorld in [110, 111, 112, 113, 114]: self.catchTheCheeseShaman(shamanCode) elif self.room.currentWorld in [44, 45, 46, 47, 48, 49, 50, 51, 52, 53]: shamone = self.room.getDoubleShamanCode(1) shamtwo = self.room.getDoubleShamanCode(2) double = True print 'Sham1: %s Sham2: %s'%(str(shamone), str(shamtwo)) self.sendDoubleShamanCode(shamone, shamtwo) else: self.sendShamanCode(shamanCode) if double: if shamone == self.playerCode: self.isShaman = True elif shamtwo == self.playerCode: self.isShaman = True else: if shamanCode == self.playerCode: self.isShaman = True syncroniserCode = self.room.getSyncroniserCode() self.sendSynchroniser(syncroniserCode) if syncroniserCode == self.playerCode: self.isSyncroniser = True if self.username == "Timekeeper": self.isDead = True self.room.informAll(TransformiceClientHandler.sendPlayerDied, [self.playerCode, self.score]) if self.room.currentWorld==888: self.sendData("\x15" + "\x15", ["0", "Papai Noel", "21,0,3,4,3", "600", "335", "0", "0"]) self.sendData("\x15" + "\x15", ["1", "Brunok", "21,0,3,4,3", "500", "300", "1", "0"]) if self.room.name=="801": self.sendData("\x15" + "\x15", ["-1", "Brunok", "6,1,0,7,2", "700", "335", "0", "1"]) self.sendData("\x15" + "\x15", ["-2", "Sonic", "13,0,0,3,0", "100", "200", "1", "0"]) self.sendData("\x15" + "\x15", ["-3", "Seven", "47,0,2,0,0", "200", "200", "0", "0"]) self.sendData("\x15" + "\x15", ["-4", "Xbrasilx", "47,6,0,6,0", "600", "200", "1", "0"]) self.sendData("\x15" + "\x15", ["-5", "Livia", "35,0,1,0,0", "700", "200", "0", "0"]) #(801) [c] Kingboo: 'snpc jawster 1,5,0,3,0 400 350' #if rotation == "left": #rotation = "0" #elif rotation == "right": #rotation = "1" try: self.notCustom.stop() except: if self.room.isTesting: pass else: self.notCustom = threading.Timer(5, self.endCustom) self.notCustom.start() def endCustom(self): self.room.isCustom = False def login(self, username, passwordHash, startRoom): if username == "": username = "Souris" if username == "S": self.sendData("\x1A" + "\x12",["0", "Ah, test is pro ^^s"]) if passwordHash == "": if len(username)>=9: priv = -1 self.close() else: username = "*"+username priv = 0 username = self.server.checkAlreadyExistingGuest(username) else: username=username.lower() username=username.capitalize() priv = self.server.authenticate(username, passwordHash) if priv != 0: username=username.lower() username=username.capitalize() dbcur.execute('select * from userpermaban where name = ?', [username]) rrf = dbcur.fetchone() print rrf if rrf is None: pass else: print '-1' priv = -1 print "["+self.address[0]+" - "+username+"] Permabanned user tried to logon." self.sendPermaBan() #self.room.informAll(TransformiceClientHandler.sendPlayerDisconnect, [self.playerCode]) #self.room.removeClient(self) self.close() if priv == -1: #return False #self.close() self.sendData("\x1A" + "\x03", ["\x00"+"6"]) self.wrongPasswordAttempts+=1 if self.wrongPasswordAttempts>=4: self.sendData("\x1A" + "\x12",["0", "Too many incorrect password attempts"]) logging.info("Kick - Too many wrong passwords - %s" % self.address[0]) self.close() else: alreadyconnect = self.server.checkAlreadyConnectedAccount(username) if alreadyconnect == True: self.sendData("\x1A" + "\x03", ["\x01"]) else: self.username = username self.playerCode = self.server.generatePlayerCode() self.privilegeLevel = priv self.titleNumber = self.server.getCurrentTitle(username) self.roundCount = self.server.getRoundsCount(username) self.tribe = self.server.getTribeName(username) self.tribeName = self.server.getTribeName(username) self.tribeGreeting = self.server.getTribeGreeting(self.tribeName) self.tribeSettings = self.server.getTribeSettings(self.tribeName) self.tribeRank = self.server.getTribeRank(username) isDrawer = self.server.getDrawer(username) if str(isDrawer) == "1": self.isDrawer = True else: self.isDrawer = False if self.tribeName == "": pass else: self.sendData("\x10" + "\x12", ["2", self.tribeName, "0", self.tribeGreeting, self.tribeSettings, self.tribeRank]) self.micesaves = self.server.getSavesCount(username) self.shamancheese = self.server.getShamanCheeseCount(username) self.firstcount = self.server.getFirstCount(username) self.cheesecount = self.server.getCheeseCount(username) self.shopcheese = self.server.getShopCheese(username) self.titleList = self.server.getTitleList(username) self.shopitems = self.server.getUserShop(username) self.look = self.server.getUserLook(username) self.fur = self.server.getFurColor(username) self.titleList = self.titleList.strip('[]') self.titleList = self.titleList.replace("\"","") self.titleList = self.titleList.replace(","," ") self.titleList = str(self.titleList) self.titleList = self.titleList.split(" ") print self.username print self.titleList self.sendTitleList() self.giftCount = 0 #self.sendTribeGreeting() # [Version] Game: 0.129Server: 1.012 self.sendPlayerLoginData() if passwordHash ==