"\x14", ) else: self.sendData("\x08" + "\x14", [shamanPlayerCode] ) def sendDoubleShamanCode(self, shamanPlayerCode, shamanPlayerCodeTwo): self.sendData("\x08" + "\x14", [shamanPlayerCode, shamanPlayerCodeTwo] ) def sendSynchroniser(self, playerCode): self.sendData("\x08" + "\x15", [playerCode] ) def sendNewTitle(self, titlenum): self.sendData("\x08" + "\x0D",[titlenum]) def sendTime(self, timeLeft): self.sendData("\x05" + "\x06", [timeLeft] ) def sendTwenty(self): self.sendData("\x06" + "\x11") def sendSetAnchors(self, anchors): self.sendData("\x05" + "\x07", anchors ) def sendATEC(self): self.sendData("\x1A" + "\x1A") def sendPING(self): self.sendData("\x04" + "\x14") def sendShamanPerformance(self, shamanName, numGathered): #Will display "Info_Fromage_Chamane" in chat # - "Thanks to %1, we gathered %2 cheese !" self.sendData("\x08" + "\x11", [shamanName, numGathered] ) #pass def sendPlayerAction(self, playerCode, action): self.sendData("\x08" + "\x16", [playerCode, action] ) def sendModMessageChannel(self, name, message): self.room.sendModChat(self, "\x1A\x05", [name, message]) def sendAdminMessageChannel(self, name, message): self.room.sendAdminChat(self, "\x1A\x06", [name, message]) def sendTribeLogin(self, tribename, username): self.room.sendTribeMsg(self, "\x10\x04", [tribename, '1', username]) def sendServeurMessage(self, message): self.room.sendServeur(self, "\x06\x14", [message]) print '[Servidor] %s' % (message) def sendFriendLog(self, user): self.room.sendFriend(self, "\x08\x0B", [user]) def sendServerMessageName(self, name, message): self.room.sendWholeServer(self, "\x1A\x04", ["[~"+name+"] ", message]) def sendRestartMessage(self, message): self.room.sendWholeServer(self, "\x1A\x04", ["[SERVIDOR] ", "%s "%(message)]) def sendModMessage(self, name, message): self.room.sendAllOthersAndSelf(self, "\x1A\x04", ["[~Moderacao] ", message]) def sendServerMessage(self, message): self.room.sendWholeServer(self, "\x1A\x04", ["[~Mensagem Server] ", message]) def sendGiftAmount(self, amount): self.sendData("\x13" + "\x14", [amount] ) def saveRemainingMiceMessage(self): #You must save all the remaining mice before you can enter the hole. self.sendData("\x08" + "\x12", ) def sendPlayMusic(self, path): self.sendData("\x1A" + "\x0C", [path] ) def sendSentPrivMsg(self, username, message): self.sendData("\x06" + "\x07", [message, username] ) def sendRecievePrivMsg(self, username, message): self.sendData("\x06" + "\x07", [message, username, "x"] ) def sendPlayerNotFound(self): self.sendData("\x06" + "\x07") def getPlayerData(self): #FUR return '#'.join(map(str, #has cheese #unknown #forum ID [self.username, self.playerCode, int(self.isDead), self.score, 0, self.titleNumber, 0, self.look, self.fur, 1] )) def enterRoom(self, roomName): enter = True if roomName.startswith("[Private]"): privates = ['Kingboo', 'Sooki', '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