def run (message):

    # Read the configuration as the plugin is run()
    config = ConfigParser.ConfigParser()
    config.read(
        os.path.join(os.path.dirname(__file__), '../../../settings.ini'))

    config_owners = config.get('acl', 'owners', '').split(',')
    config_users = config.get('acl', 'users', '').split(',')

    # If we dont have any users configured, set a empty
    # list
    if not any(config_users):
        config_users = []

    # If we don't have an owner configured, log it and respond.
    if len(config_owners) < 1:
        logger.error('ACL modification denied for {first_name}. No owners configured'.format(
            first_name = message['from']['first_name']
        ))
        return 'I will only allow the owner to do this.'

    # If the request came from someone that is not a owner, log and respond
    if str(message['from']['id']) not in config_owners:
        logger.error('ACL modification denied for {first_name}. Not an owner'.format(
            first_name = message['from']['first_name']
        ))
        return 'I will only allow the owner to do this.'

    # check if the received contact is considered a user
    if str(message['contact']['user_id']) in config_users:

        # Remove the user
        logger.info('{owner_first_name} removed {first_name} ({id}) as a user'.format(
            owner_first_name = message['from']['first_name'],
            first_name = message['contact']['first_name'],
            id = message['contact']['user_id']
        ))

        config_users.remove(str(message['contact']['user_id']))
        config.set('acl', 'users', ','.join(config_users))

        status = 'Removed {first_name} ({id}) as a user.'.format(
            first_name = message['contact']['first_name'],
            id = message['contact']['user_id']
        )

    else:

        # Add the user
        logger.info('{owner_first_name} added {first_name} ({id}) as a user'.format(
            owner_first_name = message['from']['first_name'],
            first_name = message['contact']['first_name'],
            id = message['contact']['user_id']
        ))

        config_users.append(str(message['contact']['user_id']))
        config.set('acl', 'users', ','.join(config_users))

        status = 'Added {first_name} ({id}) as a user.'.format(
            first_name = message['contact']['first_name'],
            id = message['contact']['user_id']
        )

    # Write the confuration changes
    with open(
            os.path.join(os.path.dirname(__file__), '../../../settings.ini'), 'wb') as s:
        config.write(s)

    return status
! Prints plugins' information in user friendly way
dataset/ETHPy150Open leonjza/hogar/hogar/Plugins/Acl/main.py/run--crossover with--dataset/ETHPy150Open ARMmbed/htrun/mbed_host_tests/host_tests_plugins/__init__.py/print_plugin_info