'Perform the command'

def func(self):

    player = self.player
    permstr = ((player.is_superuser and '    (superuser)') or ('(%s)' % ',    '.join(player.permissions.all())))
    if (self.cmdstring == '@unquell'):
        if (not player.attributes.get('_quell')):
            self.msg(('Already    using    normal    Player    permissions    %s.' % permstr))
        else:
            player.attributes.remove('_quell')
            self.msg(('Player    permissions    %s    restored.' % permstr))
    else:
        if player.attributes.get('_quell'):
            self.msg(('Already    quelling    Player    %s    permissions.' % permstr))
            return
        player.attributes.add('_quell', True)
        puppet = self.session.puppet
        if puppet:
            cpermstr = ('(%s)' % ',    '.join(puppet.permissions.all()))
            cpermstr = ("Quelling    to    current    puppet's    permissions    %s." % cpermstr)
            cpermstr += ('\n(Note:    If    this    is    higher    than    Player    permissions    %s,    the    lowest    of    the    two    will    be    used.)' % permstr)
            cpermstr += '\nUse    @unquell    to    return    to    normal    permission    usage.'
            self.msg(cpermstr)
        else:
            self.msg(('Quelling    Player    permissions%s.    Use    @unquell    to    get    them    back.' % permstr))
    self._recache_locks(player)
