hook.access

class immp.hook.access.AccessPredicate

Bases: object

Interface for hooks to provide channel access control from a backing source.

channel_access(channel, user)

Verify if a user is allowed access to a channel.

Parameters
  • channel (Channel) – Target channel.
  • user (User) – Incoming user to be verified.
Returns

True if the user is to be granted access.

Return type

bool

class immp.hook.access.ChannelAccessHook(name, config, host, virtual=False)

Bases: immp.core.hook.Hook, immp.hook.access.AccessPredicate

Hook for controlling membership of, and joins to, secure channels.