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...
This commit is contained in:
Gavin Bises 2015-02-21 21:29:59 -05:00 committed by Fabio Bas
parent d1b243481b
commit 735fcbf311
16 changed files with 394 additions and 48 deletions

View file

@ -123,6 +123,7 @@ SET(PROTO_FILES
response_join_room.proto
response_list_users.proto
response_login.proto
response_register.proto
response_replay_download.proto
response_replay_list.proto
response.proto

View file

@ -24,6 +24,14 @@ message Response {
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;
@ -35,6 +43,7 @@ message Response {
DECK_LIST = 1006;
DECK_DOWNLOAD = 1007;
DECK_UPLOAD = 1008;
REGISTER = 1009;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
}

View file

@ -0,0 +1,9 @@
import "response.proto";
message Response_Register {
extend Response {
optional Response_Register ext = 1009;
}
optional string denied_reason_str = 1;
optional uint64 denied_end_time = 2;
}

View file

@ -1,3 +1,5 @@
import "serverinfo_user.proto";
message SessionCommand {
enum SessionCommandType {
PING = 1000;
@ -16,6 +18,7 @@ message SessionCommand {
DECK_UPLOAD = 1013;
LIST_ROOMS = 1014;
JOIN_ROOM = 1015;
REGISTER = 1016;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
REPLAY_MODIFY_MATCH = 1102;
@ -94,3 +97,21 @@ message Command_JoinRoom {
}
optional uint32 room_id = 1;
}
// User wants to register a new account
message Command_Register {
extend SessionCommand {
optional Command_Register ext = 1016;
}
// User name client wants to register
required string user_name = 1;
// Hashed password to be inserted into database
required string password = 2;
// Email address of the client for user validation
optional string email = 3;
// Gender of the user
optional ServerInfo_User.Gender gender = 4;
// Country code of the user. 2 letter ISO format
optional string country = 5;
optional string real_name = 6;
}