def execute(self):
        if self.pc.position[0].find(self.alias) != -1:
            self.pc.update_output('You are already sitting.')
            return
        if not self.args:
            if self.pc.position[0] == 'sleeping':
                self.pc.update_output('You wake and sit up.')
                if self.pc.location:
                    self.pc.location.tell_room('%s wakes and sits up.' % self.pc.fancy_name(), [self.pc.name], self.pc)
                self.pc.change_position('sitting', self.pc.position[1])
            else:
                self.pc.update_output('You sit down.')
                if self.pc.location:
                    self.pc.location.tell_room('%s sits down.' % self.pc.fancy_name(), [self.pc.name], self.pc)
                self.pc.change_position('sitting')
        else:
            if not self.pc.location:
                self.pc.update_output('The void is bereft of anything to sit on.')
                return
            exp = r'((on)|(in))?([ ]?)?(?P<furn>(\w|[ ])+)'
            furn_kw = re.match(exp, self.args.lower().strip()).group('furn')
            furn = self.pc.location.get_item_by_kw(furn_kw)
            if not furn:
                self.pc.update_output('You don\'t see that here.')
                return
            f_obj = furn.item_types.get('furniture')
            if not f_obj:
                self.pc.update_output('That\'s not a type of furniture.')
                return
            if not f_obj.player_add(self.pc):
                self.pc.update_output('It\'s full right now.')
                return
            else:
                if self.pc.position[1]:
                    self.pc.position[1].item_types['furniture'].player_remove(self.pc)
                f_obj.player_add(self.pc)
                self.pc.position = ('sitting', furn)
                self.pc.update_output('You sit down on %s.' % furn.name)
                self.pc.location.tell_room('%s sits down on %s.' % (self.pc.fancy_name(), furn.name), 
                                             [self.pc.name], self.pc)
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/commands/commands.py/Sit.execute/original