Auditable Server Sessions: Extension of the stock ServerSession that yields objects representing user inputs and system outputs.

Evennia contribution - Johnny 2017

class evennia.contrib.utils.auditing.server.AuditedServerSession[source]

Bases: evennia.server.serversession.ServerSession

This particular implementation parses all server inputs and/or outputs and passes a dict containing the parsed metadata to a callback method of your creation. This is useful for recording player activity where necessary for security auditing, usage analysis or post-incident forensic discovery.

* WARNING * All strings are recorded and stored in plaintext. This includes those strings which might contain sensitive data (create, connect, @password). These commands have their arguments masked by default, but you must mask or mask any custom commands of your own that handle sensitive information.

See README.md for installation/configuration instructions.


Extracts messages and system data from a Session object upon message send or receive.

Keyword Arguments
  • src (str) – Source of data; ‘client’ or ‘server’. Indicates direction.

  • text (str or list) – Client sends messages to server in the form of lists. Server sends messages to client as string.


log (dict)

Dictionary object containing parsed system and user data

related to this message.


Masks potentially sensitive user information within messages before writing to log. Recording cleartext password attempts is bad policy.


msg (str) – Raw text string sent from client <-> server


msg (str) – Text string with sensitive information masked out.


Generic hook for sending data out through the protocol.

Keyword Arguments

kwargs (any) – Other data to the protocol.


Hook for protocols to send incoming data to the engine.

Keyword Arguments

kwargs (any) – Other data from the protocol.