servatrice/common/pb/response.proto
Gavin Bises 735fcbf311 Add first draft of protocol extension for registration
Stub for registration command handling in server

First draft of handling registration requests

WIP (will be rebased)

clean up bad imports (rebase this later)

Finish checkUserIsBanned method

Add username validity check

Check servatrice registration settings

WIP

Finish(?) server side of registration

Needs testing

Fix switch case compile failure

I have no idea why I have to do this

WIP for registration testing python script

Stub register script initial attempt

Rearrange register script

First try at sending reg

register.py sends commands correctly now

Add more debug to register.py

Pack bytes the right way - servatrice can parse py script sends now

register.py should be working now

Parse xml hack correctly

Log registration enabled settings on server start

Insert gender correctly on register

Show tcpserver error message on failed gameserver listen

Fail startup if db configured and can't be opened.

TIL qt5 comes without mysql by default in homebrew...
2015-05-22 18:55:51 +02:00

54 lines
1.8 KiB
Protocol Buffer

message Response {
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; // Server agrees to process client's registration request
RespUserAlreadyExists = 24; // Client attempted to register a name which is already registered
RespEmailRequiredToRegister = 25; // Server requires email to register accounts but client did not provide one
RespServerDoesNotUseAuth = 26; // Client attempted to register but server does not use authentication
RespTooManyRequests = 27; // Server refused to complete command because client has sent too many too quickly
RespAccountNotActivated = 28; // Client attempted to log into a registered username but the account hasn't been activated
RespRegistrationDisabled = 29; // Server does not allow clients to register
RespRegistrationFailed = 30; // Server accepted a reg request but failed to perform the registration
}
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;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
}
required uint64 cmd_id = 1;
optional ResponseCode response_code = 2;
extensions 100 to max;
}