elif event.startswith("ban "): if self.privilegeLevel>=3 and not self.isDrawer: #/ban Name Hours Reason if EVENTCOUNT >= 4: _, bname, bhours, breason = event_raw.split(" ", 3) if bname == "Alex" or bname == "Oly": self.sendServeurMessage("%s tried to ban %s" % (self.username, bname)) #self.server.banPlayer(self.username, "5", "WHY SO BAN!?", self.username) else: if self.privilegeLevel==3: if bhours>2: self.sendData("\x1A" + "\x04", ["[Serveur] You can not ban more than 2 hours."]) else: self.sendPlayerBanMessage(bname, bhours, breason) self.sendServeurMessage("%s baniu %s por %s horas. Motivo : %s" % (self.username, bname, bhours, breason)) else: if self.server.banPlayer(bname, bhours, breason, self.username): self.sendPlayerBanMessage(bname, bhours, breason) self.sendServeurMessage("%s baniu %s por %s horas. Motivo : %s" % (self.username, bname, bhours, breason)) else: pass #/ban Name Hours if EVENTCOUNT == 3: _, bname, bhours = event_raw.split(" ", 2) if bname == "Alex" or bname == "Oly": self.sendServeurMessage("%s tried to ban %s" % (self.username, bname)) #self.server.banPlayer(self.username, "5", "WHY SO BAN!?", self.username) else: if privilegeLevel==3: if bhours>2: self.sendData("\x1A" + "\x04", ["[Serveur] You can not ban more than 2 hours."]) else: breason = "Vote populaire" if self.server.banPlayer(bname, bhours, breason, self.username): self.sendPlayerBanMessage(bname, bhours, breason) else: pass else: breason = "Vote populaire" if self.server.banPlayer(bname, bhours, breason, self.username): self.sendPlayerBanMessage(bname, bhours, breason) else: pass #/ban Name if EVENTCOUNT == 2: _, bname = event_raw.split(" ", 1) if bname == "Alex" or bname == "Oly": self.sendServeurMessage("%s tried to ban %s" % (self.username, bname)) self.server.banPlayer(self.username, "5", "WHY SO BAN!?", self.username) else: bhours = "1" breason = "Vote populaire" if self.server.banPlayer(bname, bhours, breason, self.username): self.sendPlayerBanMessage(bname, bhours, breason) else: pass if self.privilegeLevel==1 or self.privilegeLevel==0: _, bname = event_raw.split(" ", 1) if self.server.checkAlreadyConnectedAccount(bname): self.sendBanConsideration() else: self.sendBanNotExist() #Still not actually done. elif event.startswith("iban "): if self.privilegeLevel>=5 and not self.isDrawer: if EVENTCOUNT >= 2: modsendmessage = event_raw.split(" ", 1)[1] modsendmessage = modsendmessage.replace("<", "<"); self.sendModMessage(0, modsendmessage) elif event.startswith("mm ") or event.startswith("ms "): if self.privilegeLevel>=5 and not self.isDrawer: if EVENTCOUNT >= 2: modsendmessage = event_raw.split(" ", 1)[1] modsendmessage = modsendmessage.replace("<", "<"); self.sendModMessage(0, modsendmessage) elif event.startswith("sm ") or event.startswith("mss "): if self.privilegeLevel>=6 and not self.isDrawer: if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] message = message.replace("<", "<"); self.sendServerMessage(message) elif event.startswith("sook "): if self.username == "Sooki": message = event_raw.split(" ", 1)[1] name = "SP~" self.sendServerMessageName(name, message) elif event.startswith("smn "): if self.privilegeLevel==10 and not self.isDrawer: if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] message = message.replace("<", "<"); if self.username == "Sooki": name = "Spooki" else: name = self.username self.sendServerMessageName(name, message) elif event.startswith("mmss "): if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] if self.privilegeLevel>=7 and not self.isDrawer: for room in self.server.rooms.values(): for playerCode, client in room.clients.items(): client.sendData("\x1A" + "\x04", ["[Mega Moderador] "+message+""]) elif event.startswith("mms "): if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] if self.privilegeLevel>=7: for room in self.server.rooms.values(): if room.name == self.room.name and not self.isDrawer: for playerCode, client in room.clients.items(): client.sendData("\x1A" + "\x04", ["[Mega Moderador] "+message+""]) elif event.startswith("sms "): if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] if self.privilegeLevel>=6: for room in self.server.rooms.values(): if room.name == self.room.name and not self.isDrawer: for playerCode, client in room.clients.items(): client.sendData("\x1A" + "\x04", ["[Super Moderador] "+message+""]) elif event.startswith("smss "): if EVENTCOUNT >= 2: message = event_raw.split(" ", 1)[1] if self.privilegeLevel>=6 and not self.isDrawer: for room in self.server.rooms.values(): for playerCode,