'Oly', 'Alex', 'Solarra', 'Jawster', 'Wimp'] if self.username in privates: self.sendData("\x1A" + "\x04", ["Bem-vindo %s! This room is for the private people only :P"%(self.username)]) else: self.sendData("\x1A" + "\x04", ["You are not allowed in this room ^_^"]) self.room.removeClient(self) self.enterRoom("1") enter = False if roomName.startswith("\x03"+"[Editeur] "): editeurnamecheck = roomName.replace("\x03"+"[Editeur] ", "") if editeurnamecheck == self.username: pass if editeurnamecheck != self.username: self.room.informAll(TransformiceClientHandler.sendPlayerDisconnect, [self.playerCode]) self.room.removeClient(self) hmessage = "["+self.address[0]+" - "+self.username+"] Attempted to go to "+editeurnamecheck+"'s editor room." self.sendAdminMessageChannel("Hack Detect", hmessage) self.close() if enter: if self.room: self.room.removeClient(self) self.resetPlay() self.score = 0 self.sendEnterRoom(roomName) #self.room = self.server.addClientToRoom(self, roomName)#self.room.removeClient(self) #print 'Added %s to room'%(str(self)) def resetPlay(self): self.isShaman = False self.isDead = False self.isSyncroniser = False def startPlay(self): if self.room.getPlayerCount() >= 2: self.roundCount=self.roundCount+1 self.resetPlay() self.sendGiftAmount(self.giftCount) if self.room.isBootcamp: mapcode=1337 mapcode=str(mapcode) code = mapcode dbcur.execute('select name from mapeditor where code = ?', [code]) rrf = dbcur.fetchone() mapname=rrf[0] del rrf dbcur.execute('select mapxml from mapeditor where code = ?', [code]) rrf = dbcur.fetchone() mapxml=rrf[0] del rrf dbcur.execute('select yesvotes from mapeditor where code = ?', [code]) rrf = dbcur.fetchone() yesvotes=rrf[0] del rrf dbcur.execute('select novotes from mapeditor where code = ?', [code]) rrf = dbcur.fetchone() novotes=rrf[0] del rrf dbcur.execute('select perma from mapeditor where code = ?', [code]) rrf = dbcur.fetchone() perma=rrf[0] del rrf dbcur.execute('select deleted from mapeditor where code = ?', [code]) rrf = dbcur.fetchone() mapnoexist=rrf[0] self.sendNewPartyCustomMap(mapxml, mapname, perma) elif self.room.name == "801": mapcode="802" mapxml='' mapname="802" perma=0 self.sendNewPartyCustomMap(mapxml, mapname, perma) else: if self.room.isCustom: try: mapcode=self.room.customMap mapcode=str(mapcode) mapname=self.server.getMapName(mapcode) mapxml=self.server.getMapXML(mapcode) yesvotes=self.server.getMapYesVotes(mapcode) novotes=self.server.getMapNoVotes(mapcode) perma=self.server.getMapPerma(mapcode) mapnoexist=self.server.getMapDel(mapcode) self.sendNewPartyCustomMap(mapxml, mapname, perma) except: self.sendServeurMessage("No 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