diff --git a/common/pb/CMakeLists.txt b/common/pb/CMakeLists.txt index 889bc7692..9efecf172 100644 --- a/common/pb/CMakeLists.txt +++ b/common/pb/CMakeLists.txt @@ -128,6 +128,7 @@ SET(PROTO_FILES response_register.proto response_replay_download.proto response_replay_list.proto + response_server_status.proto response_adjust_mod.proto response_warn_history.proto response_warn_list.proto diff --git a/common/pb/response.proto b/common/pb/response.proto index 75bca97a8..b6b65279d 100644 --- a/common/pb/response.proto +++ b/common/pb/response.proto @@ -61,6 +61,7 @@ message Response { FORGOT_PASSWORD_REQUEST = 1016; REPLAY_LIST = 1100; REPLAY_DOWNLOAD = 1101; + SERVER_STATUS = 1200; } required uint64 cmd_id = 1; optional ResponseCode response_code = 2; diff --git a/common/pb/response_server_status.proto b/common/pb/response_server_status.proto new file mode 100644 index 000000000..2eb300e7a --- /dev/null +++ b/common/pb/response_server_status.proto @@ -0,0 +1,30 @@ +// Response for Command_Server_Status +syntax = "proto2"; +import "response.proto"; + +message Response_Server_Status { + extend Response { + optional Response_Server_Status ext = 1200; + } + required RegistrationStatus registration_status = 1; + required bool password_enabled = 2; + + required int32 connected_users = 3; + optional int32 max_users = 4; + + required string server_name = 5; + optional string server_description = 6; + optional string server_admin_contact = 7; + optional string server_website = 8; + + repeated string required_features = 9; + repeated int32 cockatrice_ports = 10; + repeated int32 webatrice_ports = 11; + +} + +enum RegistrationStatus { + disabled = 1; + enabled = 2; + required = 3; +} \ No newline at end of file diff --git a/common/pb/session_commands.proto b/common/pb/session_commands.proto index f231abef0..deed17443 100644 --- a/common/pb/session_commands.proto +++ b/common/pb/session_commands.proto @@ -31,6 +31,7 @@ message SessionCommand { REPLAY_DOWNLOAD = 1101; REPLAY_MODIFY_MATCH = 1102; REPLAY_DELETE_MATCH = 1103; + SERVER_STATUS = 1200; } extensions 100 to max; } @@ -191,3 +192,9 @@ message Command_ForgotPasswordChallenge { optional string clientid = 2; optional string email = 3; } + +message Command_Server_Status { + extend SessionCommand { + optional Command_Server_Status ext = 1200; + } +} \ No newline at end of file