Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
Response Struct Reference

Public Types

enum  ResponseCode {
  RespNotConnected = -1 , RespNothing = 0 , RespOk = 1 , RespNotInRoom = 2 ,
  RespInternalError = 3 , RespInvalidCommand = 4 , RespInvalidData = 5 , RespNameNotFound = 6 ,
  RespLoginNeeded = 7 , RespFunctionNotAllowed = 8 , RespGameNotStarted = 9 , RespGameFull = 10 ,
  RespContextError = 11 , RespWrongPassword = 12 , RespSpectatorsNotAllowed = 13 , RespOnlyBuddies = 14 ,
  RespUserLevelTooLow = 15 , RespInIgnoreList = 16 , RespWouldOverwriteOldSession = 17 , RespChatFlood = 18 ,
  RespUserIsBanned = 19 , RespAccessDenied = 20 , RespUsernameInvalid = 21 , RespRegistrationRequired = 22 ,
  RespRegistrationAccepted = 23 , RespUserAlreadyExists = 24 , RespEmailRequiredToRegister = 25 , RespTooManyRequests = 26 ,
  RespPasswordTooShort = 27 , RespAccountNotActivated , RespRegistrationDisabled = 29 , RespRegistrationFailed = 30 ,
  RespActivationAccepted = 31 , RespActivationFailed = 32 , RespRegistrationAcceptedNeedsActivation , RespClientIdRequired = 34 ,
  RespClientUpdateRequired = 35 , RespServerFull = 36 , RespEmailBlackListed = 37 , RespPasswordChangeRequired = 38
}
enum  ResponseType {
  JOIN_ROOM = 1000 , LIST_USERS = 1001 , GET_GAMES_OF_USER = 1002 , GET_USER_INFO = 1003 ,
  DUMP_ZONE = 1004 , LOGIN = 1005 , DECK_LIST = 1006 , DECK_DOWNLOAD = 1007 ,
  DECK_UPLOAD = 1008 , REGISTER = 1009 , ACTIVATE = 1010 , ADJUST_MOD = 1011 ,
  BAN_HISTORY = 1012 , WARN_HISTORY = 1013 , WARN_LIST = 1014 , VIEW_LOG = 1015 ,
  FORGOT_PASSWORD_REQUEST = 1016 , PASSWORD_SALT = 1017 , GET_ADMIN_NOTES = 1018 , REPLAY_LIST = 1100 ,
  REPLAY_DOWNLOAD = 1101 , REPLAY_GET_CODE = 1102 , CARD_ART_RULE_LIST = 1200
}

Public Attributes

required uint64 cmd_id = 1
 Command ID that this response corresponds to.
optional ResponseCode response_code = 2
 Outcome code of the command.
extensions to max
 Protobuf extensions reserved for future use.

Detailed Description

/ Server response envelope linking to a command This struct is sent immediately after a client command, using the same cmd_id to connect the response to the command::

Responses may contain standard outcome codes (ResponseCode) and indicate what type of response the server is sending (ResponseType)::

Member Enumeration Documentation

◆ ResponseCode

Outcome of the command sent by the client

Enumerator
RespNotConnected 

Client is not connected or session expired.

RespNothing 

No response required.

RespOk 

Command succeeded.

RespNotInRoom 

Client is not in the room for this command.

RespInternalError 

Server encountered an unexpected error.

RespInvalidCommand 

Command was invalid or unrecognized.

RespInvalidData 

Command data was invalid or malformed.

RespNameNotFound 

Target user not found.

RespLoginNeeded 

Client must log in first.

RespFunctionNotAllowed 

Client tried to perform a restricted action.

RespGameNotStarted 

Game has not started yet.

RespGameFull 

Game is full.

RespContextError 

Context (room/game) mismatch.

RespWrongPassword 

Password for this room or game is incorrect.

RespSpectatorsNotAllowed 

Spectators are not allowed in this room/game.

RespOnlyBuddies 

Only buddies can perform this action.

RespUserLevelTooLow 

User’s permission level is insufficient.

RespInIgnoreList 

Target user has ignored the client.

RespWouldOverwriteOldSession 

Would overwrite an existing session.

RespChatFlood 

Too many messages sent in short time.

RespUserIsBanned 

Client is banned.

RespAccessDenied 

Access to this action is denied.

RespUsernameInvalid 

Username is invalid.

RespRegistrationRequired 

Registration is required.

RespRegistrationAccepted 

Server agrees to process client's registration request.

RespUserAlreadyExists 

Client attempted to register a name which is already registered.

RespEmailRequiredToRegister 

Server requires email to register accounts but client did not provide one.

RespTooManyRequests 

Server refused to complete command because client has sent too many too quickly.

RespPasswordTooShort 

Server requires a decent password.

RespAccountNotActivated 

Client attempted to log into a registered username but the account hasn't been activated.

RespRegistrationDisabled 

Server does not allow clients to register.

RespRegistrationFailed 

Server accepted a reg request but failed to perform the registration.

RespActivationAccepted 

Server accepted a reg user activation token.

RespActivationFailed 

Server didn't accept a reg user activation token.

RespRegistrationAcceptedNeedsActivation 

Server accepted client registration, but it will need token activation.

RespClientIdRequired 

Server requires client to generate and send its client id before allowing access.

RespClientUpdateRequired 

Client is missing features that the server is requiring.

RespServerFull 

Server user limit reached.

RespEmailBlackListed 

Server has blocked the email address provided for registration for some reason.

RespPasswordChangeRequired 

Server requires the user to change their password before proceeding.

◆ ResponseType

Type of response, used to route handling on the client

Enumerator
JOIN_ROOM 

Response for joining a room.

LIST_USERS 

Response listing users.

GET_GAMES_OF_USER 

Response with user's games.

GET_USER_INFO 

Response with user info.

DUMP_ZONE 

Response with zone dump.

LOGIN 

Response to login attempt.

DECK_LIST 

Response with deck list.

DECK_DOWNLOAD 

Response for deck download.

DECK_UPLOAD 

Response for deck upload.

REGISTER 

Response to registration.

ACTIVATE 

Response to activation.

ADJUST_MOD 

Response to mod adjustments.

BAN_HISTORY 

Response with ban history.

WARN_HISTORY 

Response with warn history.

WARN_LIST 

Response with current warnings.

VIEW_LOG 

Response with logs.

FORGOT_PASSWORD_REQUEST 

Response to password reset request.

PASSWORD_SALT 

Response containing password salt.

GET_ADMIN_NOTES 

Response with admin notes.

REPLAY_LIST 

Response listing replays.

REPLAY_DOWNLOAD 

Response for replay download.

REPLAY_GET_CODE 

Response containing replay code.

CARD_ART_RULE_LIST 

Response containing a list of card art rules.

Member Data Documentation

◆ cmd_id

required uint64 Response::cmd_id = 1

Command ID that this response corresponds to.

◆ max

extensions to Response::max

Protobuf extensions reserved for future use.

◆ response_code

optional ResponseCode Response::response_code = 2

Outcome code of the command.


The documentation for this struct was generated from the following file: