Ackis2.0/OriginalProtocol

From Makers Local 256
Jump to: navigation, search
  • XML Layout: <packet event=""[ type=""][ responseid=""]><message data="" mime=""[ value=""]/></packet>
  • All tags, attributes, and values are case insensitive except for the response ID
    • Response ID case sensitivity is dependent on implementation, but it is safest to assume that it is case sensitive and to preserve case while matching in a case insensitive manner

XML Breakdown

Packet Tag

  • Event Attribute
  • Type Attribute
  • ResponseID Attribute

Message Tag (Subtag of Packet tag)

  • Data Attribute
  • Mime Attribute
  • Value Attribute (only valid for Variable Event, ignored otherwise)

Registrations

  • ALL COMPONENTS MUST REGISTER WITH THE CORE
  • Registrations use the "Register" event
  • XML Format: <packet event="Register" type=""><message data="" mime=""/></packet>
    • The type attribute will contain one of: Client, Module, Resource
    • The data attribute will contain a regex string to be used for callbacks for modules and clients, or a resource identifier for resources (e.g."database")
      • If the component does not wish to register a callback, it can set data="" and no callback will be registered
    • The mime attribute will contain a standard mime type, typically "text/plain"
      • For registrations, you can specify multiple mime types if necessary, separated by commas (this isn't actually supported anywhere yet)

Message Transactions

Message

  • Messages use the "Message" event (and possibly the "Response" event in the future)
  • XML Format: <packet event="Message"[ responseid=""]><message data="" type="" mime=""/></packet>
    • The data attribute will contain whatever message the initiator deemed necessary to send
      • The data can be ANY data, not just text (see mime attribute)
    • The responseid attribute, if present, will contain an identifier used to return a response to the message
      • If the responseid attribute is missing or blank, it will not be possible to return a response to the message
    • The type of the message can be one of the following:
      • "triggered" if the message was called in a general chat with a special prefixed character, but this is really up to the client to determine
      • "targeted" if the message was directed in a general chat or a message in a private chat
      • "emote" if the message was a emote in any form of chat
      • "mode" if it was a mode change
      • "" if the message was typically not directed at the bot
        • exceptions here are for example:
          • url tracking
          • AI
    • The mime attribute will contain a standard mime type, typically "text/plain"
  • Components that receive a Message packet can send a response Message packet using the same response ID that came in
    • Any attempted response where the response ID is missing or blank will be treated as an initiating Message packet to be matched in the core

Response

  • Possbile future protocol expansion

Variable Transactions

Blank or non-existent response IDs on GetVariable packets are reserved to the core and may facilitate gathering information from the module in future protocol extensions. As such, it would not be associated with a Message packet and would pertain directly to the module itself.

Clients should, at bare minimum provide a blank response for variables they don't understand. It is recommended that clients support the following variables:

  • userid

Related Information