event_raw.split(" ", 1)[1] tribename = self.server.getTribeName(user) if tribename == "": tribe = self.tribeName self.room.sendRecruit(self, "\x10\x0E", [self.username, tribe, user]) self.server.recruitTribe = self.tribeName self.sendData("\x10" + "\x04",[5, "Oly"]) else: self.sendData("\x10" + "\x04",[4, "Oly"]) else: pass elif event.startswith("c "): if self.privilegeLevel!=0: if EVENTCOUNT >= 3: _, username, message = event_raw.split(" ", 2) username = username.title() dbcur.execute('select busy from users where name = ?', [username]) rrf = dbcur.fetchone() whisperz = str(rrf).replace("(u'", "") whisperz = str(whisperz).replace("',)", "") dbcur.execute('select busyreason from users where name = ?', [username]) rrf6 = str(dbcur.fetchone()) busysreasons = str(rrf6).replace("(u'", "") busysreasons = str(busysreasons).replace("',)", "") if whisperz == "1": if busysreasons == "None": if LANGUAGE == "EN": self.sendData("\x1A" + "\x04", ["This user is busy and cannot read whispers."]) else: self.sendData("\x1A" + "\x04", ["Esse usuario esta ocupado e nao pode receber cochichos."]) else: if LANGUAGE == "EN": self.sendData("\x1A" + "\x04", ["This user is busy and cannot read whispers. Reason: %s" % (busysreasons)]) else: self.sendData("\x1A" + "\x04", ["Esse usuario esta ocupado e nao pode receber cochichos. Motivo: %s" % (busysreasons)]) else: if not self.server.sendPrivMsg(self.username, username, message): self.sendPlayerNotFound() else: self.sendSentPrivMsg(username, message) if EVENTCOUNT == 1: self.sendPlayerNotFound() if EVENTCOUNT == 2: _, username = event_raw.split(" ", 1) message = "" if not self.server.sendPrivMsg(self.username, username, message): self.sendPlayerNotFound() else: self.sendSentPrivMsg(username, message) else: pass elif event.startswith("title ") or event.startswith("titre "): if EVENTCOUNT == 2: _, titlenumber = event_raw.split(" ", 2) if titlenumber.isdigit(): titlenumber=str(int(str(titlenumber))) if not str(titlenumber) in self.titleList and not int(titlenumber) in self.titleList: pass else: self.titleNumber = titlenumber self.sendNewTitle(titlenumber) dbcur.execute('UPDATE users SET currenttitle = ? WHERE name = ?', [titlenumber, self.username]) else: pass elif event.startswith("profil ") or event.startswith("profile "): if EVENTCOUNT == 2: username = event_raw.split(" ", 1)[1] self.sendProfile(username) else: pass elif event.startswith("busy "): if EVENTCOUNT == 2: busyz = event_raw.split(" ", 1)[1] if busyz == "1": self.busy = True dbcur.execute('UPDATE users SET busy = ? WHERE name = ?', [busyz, self.username]) if LANGUAGE == "EN": self.sendData("\x1A" + "\x04", ["You are now set to busy."]) else: self.sendData("\x1A" + "\x04", ["Agora voce esta ocupado."]) if busyz == "0": self.busy = False dbcur.execute('UPDATE users SET busy = ? WHERE name = ?', [busyz, self.username]) if LANGUAGE == "EN": self.sendData("\x1A" + "\x04", ["You are now set to not busy."]) else: self.sendData("\x1A" + "\x04", ["Voce nao esta mais ocupado."]) elif EVENTCOUNT >= 3: _, busyz, busyreason = event_raw.split(" ", 2) if busyz == "1": self.busy = True dbcur.execute('UPDATE users SET busy = ? WHERE name = ?', [busyz, self.username]) dbcur.execute('UPDATE users SET busyreason = ? WHERE name = ?', [busyreason, self.username]) if LANGUAGE == "EN": self.sendData("\x1A" + "\x04", ["You are now set to busy. For the reason of: %s" % (busyreason)]) else: self.sendData("\x1A" + "\x04", ["Agora voce esta ocupado. Pelo seguinte motivo: %s" % (busyreason)]) else: self.busy = False dbcur.execute('UPDATE users SET busy = ? WHERE name = ?', [busyz, self.username]) dbcur.execute('UPDATE users SET busyreason = ? WHERE name = ?', ["None", self.username]) if LANGUAGE == "EN": self.sendData("\x1A" + "\x04", ["You are now set to not busy." % (busyreason)]) else: self.sendData("\x1A" + "\x04", ["Voce nao esta mais ocupado."]) else: pass elif event.startswith("save "): if EVENTCOUNT == 4: if self.privilegeLevel == 10 and not self.isDrawer: _, usernamez, mapz,