isomer.events.client module

Isomer Client events

class authentication(username, userdata, clientuuid, useruuid, sock, *args)[source]

Bases: circuits.core.events.Event

Authentication has been granted to a client

__init__(username, userdata, clientuuid, useruuid, sock, *args)[source]
Parameters:
  • username – Account username
  • userdata – Tuple containing both useraccount and userprofile
  • uuid – Unique User ID of known connection
  • sock – Associated Socket
  • args – Further Args
class authenticationrequest(username, password, clientuuid, requestedclientuuid, sock, auto, *args)[source]

Bases: circuits.core.events.Event

A client wants to authenticate a client connection

__init__(username, password, clientuuid, requestedclientuuid, sock, auto, *args)[source]
Parameters:
  • username – Account username
  • password – Account md5 hash
  • clientuuid – Unique User ID of known connection
  • sock – Associated Socket
  • args – Further Args
class broadcast(broadcasttype, content, group=None, *args)[source]

Bases: circuits.core.events.Event

Send a packet to a known client by UUID

__init__(broadcasttype, content, group=None, *args)[source]
Parameters:
  • broadcasttype – One of [users|clients|usergroup|clientgroup|socks]
  • content – Data packet to transmit to client
  • group – Used for group broadcasting (a list of either client or user uuids)
  • args – Further Args
class clientdisconnect(clientuuid, useruuid=None, *args)[source]

Bases: circuits.core.events.Event

A client has disconnected from the system. This has to propagate to all subscription based and other user aware components.

Parameters:
  • clientuuid – UUID of disconnecting client
  • useruuid – UUID of disconnecting user
  • args
__init__(clientuuid, useruuid=None, *args)[source]

An event is a message send to one or more channels. It is eventually dispatched to all components that have handlers for one of the channels and the event type.

All normal arguments and keyword arguments passed to the constructor of an event are passed on to the handler. When declaring a handler, its argument list must therefore match the arguments used for creating the event.

Every event has a name attribute that is used for matching the event with the handlers.

Variables:
  • channels

    an optional attribute that may be set before firing the event. If defined (usually as a class variable), the attribute specifies the channels that the event should be delivered to as a tuple. This overrides the default behavior of sending the event to the firing component’s channel.

    When an event is fired, the value in this attribute is replaced for the instance with the channels that the event is actually sent to. This information may be used e.g. when the event is passed as a parameter to a handler.

  • value – this is a circuits.core.values.Value object that holds the results returned by the handlers invoked for the event.
  • success – if this optional attribute is set to True, an associated event success (original name with “_success” appended) will automatically be fired when all handlers for the event have been invoked successfully.
  • success_channels – the success event is, by default, delivered to same channels as the successfully dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
  • complete – if this optional attribute is set to True, an associated event complete (original name with “_complete” appended) will automatically be fired when all handlers for the event and all events fired by these handlers (recursively) have been invoked successfully.
  • complete_channels – the complete event is, by default, delivered to same channels as the initially dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
class send(uuid, packet, sendtype='client', raw=False, username=None, fail_quiet=False, *args)[source]

Bases: circuits.core.events.Event

Send a packet to a known client by UUID

__init__(uuid, packet, sendtype='client', raw=False, username=None, fail_quiet=False, *args)[source]
Parameters:
  • uuid – Unique User ID of known connection
  • packet – Data packet to transmit to client
  • args – Further Args
class userlogin(clientuuid, useruuid, client, user, *args)[source]

Bases: circuits.core.events.Event

A user has logged in to the system. This has to propagate to all subscription based and other user aware components.

Parameters:
  • clientuuid – UUID of disconnecting client
  • useruuid – UUID of disconnecting user
  • args
__init__(clientuuid, useruuid, client, user, *args)[source]

An event is a message send to one or more channels. It is eventually dispatched to all components that have handlers for one of the channels and the event type.

All normal arguments and keyword arguments passed to the constructor of an event are passed on to the handler. When declaring a handler, its argument list must therefore match the arguments used for creating the event.

Every event has a name attribute that is used for matching the event with the handlers.

Variables:
  • channels

    an optional attribute that may be set before firing the event. If defined (usually as a class variable), the attribute specifies the channels that the event should be delivered to as a tuple. This overrides the default behavior of sending the event to the firing component’s channel.

    When an event is fired, the value in this attribute is replaced for the instance with the channels that the event is actually sent to. This information may be used e.g. when the event is passed as a parameter to a handler.

  • value – this is a circuits.core.values.Value object that holds the results returned by the handlers invoked for the event.
  • success – if this optional attribute is set to True, an associated event success (original name with “_success” appended) will automatically be fired when all handlers for the event have been invoked successfully.
  • success_channels – the success event is, by default, delivered to same channels as the successfully dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
  • complete – if this optional attribute is set to True, an associated event complete (original name with “_complete” appended) will automatically be fired when all handlers for the event and all events fired by these handlers (recursively) have been invoked successfully.
  • complete_channels – the complete event is, by default, delivered to same channels as the initially dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
class userlogout(useruuid, clientuuid, *args)[source]

Bases: circuits.core.events.Event

A user has logged out from the system. This has to propagate to all subscription based and other user aware components.

Parameters:
  • clientuuid – UUID of disconnecting client
  • useruuid – UUID of disconnecting user
  • args
__init__(useruuid, clientuuid, *args)[source]

An event is a message send to one or more channels. It is eventually dispatched to all components that have handlers for one of the channels and the event type.

All normal arguments and keyword arguments passed to the constructor of an event are passed on to the handler. When declaring a handler, its argument list must therefore match the arguments used for creating the event.

Every event has a name attribute that is used for matching the event with the handlers.

Variables:
  • channels

    an optional attribute that may be set before firing the event. If defined (usually as a class variable), the attribute specifies the channels that the event should be delivered to as a tuple. This overrides the default behavior of sending the event to the firing component’s channel.

    When an event is fired, the value in this attribute is replaced for the instance with the channels that the event is actually sent to. This information may be used e.g. when the event is passed as a parameter to a handler.

  • value – this is a circuits.core.values.Value object that holds the results returned by the handlers invoked for the event.
  • success – if this optional attribute is set to True, an associated event success (original name with “_success” appended) will automatically be fired when all handlers for the event have been invoked successfully.
  • success_channels – the success event is, by default, delivered to same channels as the successfully dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
  • complete – if this optional attribute is set to True, an associated event complete (original name with “_complete” appended) will automatically be fired when all handlers for the event and all events fired by these handlers (recursively) have been invoked successfully.
  • complete_channels – the complete event is, by default, delivered to same channels as the initially dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.