C>S 0x03 BOTNET_DATABASE

Transport Layer:Transmission Control Protocol (TCP)
Application Layer:BotNet Messages (PACKET)
Message Id:0x03
Message Name:BOTNET_DATABASE
Direction:Client to Server
Used By:(nothing or unknown)
Message Format:
(does not include protocol header)
(UINT32) Subcommand

For subcommand 0x01 (Request database):
    (UINT32) Maximum age          [optional; rev 4]

For subcommand 0x02 (Modify entry):
    (STRING) Usermask             [max: 40*]
    (STRING) Flags                [max: 28]
    (STRING) Comment              [optional; rev 4; max: 64]

For subcommand 0x03 (Remove entry):
    (STRING) Usermask             [max: 40]
    (STRING) Comment              [optional; rev 4; max: 64]

Remarks

Request and manipulate database data.

A database entry is a Usermask and Flags pair, conventionally describing a user or group of users on Battle.net and their permissions to the bot(s) using the database in the form of uppercase flags from A through Z.

Subcommand:

Possible values:

  • 0x01: Request database
  • 0x02: Modify entry
  • 0x03: Remove entry

Other values are reserved.


Request database:

The server responds with S>C 0x03 BOTNET_DATABASE messages in this order:

  1. A message with Subcommand 0x01 (Transfer status) with Transfer event set to 0x00 (Full transfer started) or 0x01 (Incremental transfer started). Clients are encouraged to temporarily disable database change notifications on-screen, if they are present.
  2. A series of messages with Subcommand 0x02 (Entry modified) or 0x03 (Entry removed) indicating the contents of the full or incremental transfer.
  3. A message with Subcommand 0x01 (Transfer status) with Transfer event set to 0x02 (Transfer completed).

Server revision 4 added steps 1 and 3, and there was previously no indication when full transfers were complete. Server revision 4 also added the functionality to do incremental transfers.

The Maximum age field specifies the maximum age of entries to transfer in seconds. If specified, the server may perform an incremental download of the database by transferring only the entries modified within the specified timeframe. Under some conditions, the server may decline to perform an incremental transfer and instead perform a full transfer. If Maximum age is omitted, the server will always perform a full transfer.


Modify entry and Remove entry:

Subcommand 0x02 creates an entry, or if that Usermask is already present, modifies it. Subcommand 0x03 removes an entry.

If flag 0x01 (Await server confirmation of database changes) in C>S 0x0A BOTNET_CLIENT_VERSION/S>C 0x09's Client capabilities field is clear [the default], the server responds with S>C 0x03 BOTNET_DATABASE only if the change was rejected.

If flag 0x01 (Await server confirmation of database changes) in C>S 0x0A BOTNET_CLIENT_VERSION/S>C 0x09's Client capabilities field is set, the server responds with S>C 0x03 BOTNET_DATABASE only if the change was accepted.

The Usermask field in these subcommands may be accepted at any length, but modifications will be rejected for values longer than 40 bytes.

The Flags field must be uppercase letters only.

Comment may contain any printable characters, and is distributed to other clients when the change is successful, but is not saved in the database for future retrievals. If Comment is omitted, it is assumed to be a null string. Clients are encouraged to use this to identify the user who requested the change.

| Edited: Anonymous

Comments

no one has commented yet.