csbot.plugins.auth module

class csbot.plugins.auth.PermissionDB[source]

Bases: collections.defaultdict

A helper class for assembling the permissions database.

process(entity, permissions)[source]

Process a configuration entry, where entity is an account name, @group name or * and permissions is a space-separated list of permissions to grant.

get_permissions(entity)[source]

Get the set of permissions for entity.

The union of the permissions for entity and the universal (*) permissions is returned. If entity is None, only the universal permissions are returned.

check(entity, permission, channel=None)[source]

Check if entity has permission.

If channel is present, check for a channel permission, otherwise check for a bot permission. Compatible wildcard permissions are also checked.

class csbot.plugins.auth.Auth(bot)[source]

Bases: csbot.plugin.Plugin

PLUGIN_DEPENDS = ['usertrack']
setup()[source]

Plugin setup.

  • Replace all ProvidedByPlugin attributes.
  • Fire all plugin integration methods.
  • Register all commands provided by the plugin.
check(nick, perm, channel=None)[source]
check_or_error(e, perm, channel=None)[source]