= event_raw.split(" ") self.server.setPlayerFur(temp[1], temp[2]) self.server.sendModChat(self, "\x06\x14", ["%s vient de couleur %s : %s"%(self.username, temp[1], temp[2])]) elif event.startswith("ds "): if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] if self.privilegeLevel==10: for room in self.server.rooms.values(): if room.name == self.room.name: for playerCode, client in room.clients.items(): client.sendData("\x1A" + "\x04", ["[Desenhista "+self.username+"] "+message+""]) elif event.startswith("a "): #Arb Message Channel if self.privilegeLevel > 2 and not self.isDrawer: if EVENTCOUNT >= 2: amessage = event_raw.split(" ", 1)[1] #amessage = amessage.replace("<", "<") self.sendAdminMessageChannel(self.username, amessage) elif event.startswith("t "): #Tribe if EVENTCOUNT >= 2: tmessage = event_raw.split(" ", 1)[1] #amessage = amessage.replace("<", "<") if self.tribeName == "": pass else: name = self.username message = tmessage self.room.sendTribeChat(self, "\x10\05", [tmessage, self.username, self.tribeName]) #print 'sendTribeMessage(%s, %s)'%(self.username, tmessage) elif event.startswith("m "): #Mod Message Channel if self.privilegeLevel>=5 and not self.isDrawer: if EVENTCOUNT >= 2: mmessage = event_raw.split(" ", 1)[1] self.sendModMessageChannel(self.username, mmessage) elif event.startswith("arb "): if self.privilegeLevel>=6 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 3 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) self.sendServeurMessage(str(name)+" foi nomeado Arbitro. Bem-Vindo(a)!") elif event.startswith("smodo "): if self.privilegeLevel>=8 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 6 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) self.sendServeurMessage(str(name)+" foi nomeado SuperModerador. Bem-Vindo(a)!") elif event.startswith("admin "): if self.privilegeLevel>=10 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 10 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) self.sendServeurMessage(str(name)+" foi nomeado Admin. Bem-Vindo(a)!") elif event.startswith("drawer "): if self.privilegeLevel>=10 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 10 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) dbcur.execute('UPDATE users SET isdrawer = ? WHERE name = ?', ["1", name]) self.sendServeurMessage(str(name)+" foi nomeado Desenhista. Bem-Vindo(a)!") self.server.disconnectPlayer(name) elif event.startswith("mmodo "): if self.privilegeLevel>=10 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 8 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) self.sendServeurMessage(str(name)+" foi nomeado Megamoderador. Bem-Vindo(a)!.") elif event == "validatemap": if self.privilegeLevel>=5 and not self.isDrawer: if self.room.isEditeur: if self.room.ISCMVdata[7]==0 and self.room.ISCMV!=0: self.room.ISCMVdata[7]=1 self.sendMapValidated() elif event.startswith("modo "): if self.privilegeLevel>=6 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 5 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) self.sendServeurMessage(str(name)+" foi nomeado Moderador. Bem-Vindo(a)!") elif event.startswith("demodo "): if self.privilegeLevel>=6 and not self.isDrawer: if EVENTCOUNT == 2: _, name = event_raw.split(" ", 1) privlevel = 1 dbcur.execute('UPDATE users SET privlevel = ? WHERE name = ?', [privlevel, name]) self.sendServeurMessage(str(name)+" nao faz mais parte da equipe.") #elif event.startswith("tf "): # if self.privilegeLevel==10: # if EVENTCOUNT >= 2: # tellfirstm = event.split(" ", 1)[1] # if tellfirstm == "1": # modsendmessage = "Enabled telling firsts." # self.room.informAll(TransformiceClientHandler.sendModMessage, ["~Moderation", modsendmessage]) # self.Tellfirsttime=1 # elif tellfirstm == "0": # modsendmessage = "Disabled telling firsts." # self.room.informAll(TransformiceClientHandler.sendModMessage, ["~Moderation", modsendmessage]) # self.Tellfirsttime=0 # else: # pass elif event.startswith("map ") or event.startswith("playmap ") or event.startswith("np "): if self.privilegeLevel >= 3 and not self.isDrawer: if EVENTCOUNT >= 2: mapnumber =