apply clang format to proto files (#4123)
* add proto files to clangify * apply clangify to proto files * remove blocksonsingleline, it didn't actually do anything also add missing space to the travis warning, emoji are monospace too
This commit is contained in:
parent
e2251fe06b
commit
35fe6f624c
50 changed files with 59 additions and 90 deletions
|
@ -18,7 +18,7 @@ case $err in
|
|||
*** Then commit and push those changes to this branch. ***
|
||||
*** Check our CONTRIBUTING.md file for more details. ***
|
||||
*** ***
|
||||
*** Thank you ❤️ ***
|
||||
*** Thank you ❤️ ***
|
||||
*** ***
|
||||
***********************************************************
|
||||
|
||||
|
|
|
@ -25,3 +25,7 @@ IndentCaseLabels: true
|
|||
PointerAlignment: Right
|
||||
SortIncludes: true
|
||||
IncludeBlocks: Regroup
|
||||
---
|
||||
Language: Proto
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
SpacesInContainerLiterals: false
|
||||
|
|
|
@ -18,7 +18,7 @@ exclude=("servatrice/src/smtp" \
|
|||
"oracle/src/zip" \
|
||||
"oracle/src/lzma" \
|
||||
"oracle/src/qt-json")
|
||||
exts=("cpp" "h")
|
||||
exts=("cpp" "h" "proto")
|
||||
cf_cmd="clang-format"
|
||||
branch="origin/master"
|
||||
|
||||
|
|
|
@ -37,4 +37,3 @@ message Command_AdjustMod {
|
|||
optional bool should_be_mod = 2;
|
||||
optional bool should_be_judge = 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,5 +10,3 @@ message Command_AttachCard {
|
|||
optional string target_zone = 4;
|
||||
optional sint32 target_card_id = 5 [default = -1];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ message Command_Concede {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
message Command_Unconcede {
|
||||
extend GameCommand {
|
||||
optional Command_Unconcede ext = 1032;
|
||||
|
|
|
@ -15,5 +15,3 @@ message Command_CreateToken {
|
|||
optional string target_zone = 9;
|
||||
optional sint32 target_card_id = 10 [default = -1];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@ message Command_DeckDelDir {
|
|||
}
|
||||
optional string path = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@ message Command_DeckDownload {
|
|||
}
|
||||
optional sint32 deck_id = 1 [default = -1];
|
||||
}
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ message Command_DeckNewDir {
|
|||
optional string path = 1;
|
||||
optional string dir_name = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ message Command_DeckUpload {
|
|||
extend SessionCommand {
|
||||
optional Command_DeckUpload ext = 1013;
|
||||
}
|
||||
optional string path = 1; // to upload a new deck
|
||||
optional uint32 deck_id = 2; // to replace an existing deck
|
||||
optional string path = 1; // to upload a new deck
|
||||
optional uint32 deck_id = 2; // to replace an existing deck
|
||||
optional string deck_list = 3;
|
||||
}
|
||||
|
|
|
@ -6,4 +6,3 @@ message Command_DrawCards {
|
|||
}
|
||||
optional uint32 number = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,5 +9,3 @@ message Command_FlipCard {
|
|||
optional bool face_down = 3;
|
||||
optional string pt = 4;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,5 +6,3 @@ message Command_GameSay {
|
|||
}
|
||||
optional string message = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import "game_commands.proto";
|
|||
message Command_KickFromGame {
|
||||
extend GameCommand {
|
||||
optional Command_KickFromGame ext = 1000;
|
||||
}
|
||||
}
|
||||
optional sint32 player_id = 1 [default = -1];
|
||||
}
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@ message Command_LeaveGame {
|
|||
optional Command_LeaveGame ext = 1001;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,4 +23,3 @@ message Command_MoveCard {
|
|||
optional sint32 x = 6 [default = -1];
|
||||
optional sint32 y = 7 [default = -1];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,4 +6,3 @@ message Command_Mulligan {
|
|||
}
|
||||
optional uint32 number = 7;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ message Command_ReplayModifyMatch {
|
|||
optional sint32 game_id = 1 [default = -1];
|
||||
optional bool do_not_hide = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,5 @@ import "game_commands.proto";
|
|||
message Command_ReverseTurn {
|
||||
extend GameCommand {
|
||||
optional Command_ReverseTurn ext = 1034;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,4 +6,3 @@ message Command_RollDie {
|
|||
}
|
||||
optional uint32 sides = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ message Command_SetSideboardPlan {
|
|||
}
|
||||
repeated MoveCard_ToZone move_list = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ message Command_Shuffle {
|
|||
optional sint32 start = 2 [default = 0];
|
||||
optional sint32 end = 3 [default = -1];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,4 +6,3 @@ message Event_GameHostChanged {
|
|||
optional Event_GameHostChanged ext = 1003;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,4 +6,3 @@ message Event_Kicked {
|
|||
optional Event_Kicked ext = 1004;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,3 @@ message Event_LeaveRoom {
|
|||
}
|
||||
optional string name = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import "session_event.proto";
|
|||
message Event_NotifyUser {
|
||||
|
||||
enum NotificationType {
|
||||
UNKNOWN = 0; // Default enum value if no "type" is defined when used
|
||||
UNKNOWN = 0; // Default enum value if no "type" is defined when used
|
||||
PROMOTED = 1;
|
||||
WARNING = 2;
|
||||
IDLEWARNING = 3;
|
||||
|
@ -18,5 +18,4 @@ message Event_NotifyUser {
|
|||
optional string warning_reason = 2;
|
||||
optional string custom_title = 3;
|
||||
optional string custom_content = 4;
|
||||
|
||||
}
|
||||
|
|
|
@ -14,5 +14,4 @@ message Event_RoomSay {
|
|||
optional string message = 2;
|
||||
optional RoomMessageType message_type = 3;
|
||||
optional uint64 time_of = 4;
|
||||
|
||||
}
|
||||
|
|
|
@ -60,13 +60,12 @@ message Command_ViewLogHistory {
|
|||
extend ModeratorCommand {
|
||||
optional Command_ViewLogHistory ext = 1005;
|
||||
}
|
||||
optional string user_name = 1; // user that created message
|
||||
optional string ip_address = 2; // ip address of user that created message
|
||||
optional string game_name = 3; // client id of user that created the message
|
||||
optional string game_id = 4; // game number the message was sent to
|
||||
optional string message = 5; // raw message that was sent
|
||||
repeated string log_location = 6; // destination of message (ex: main room, game room, private chat)
|
||||
required uint32 date_range = 7; // the length of time (in minutes) to look back for
|
||||
optional string user_name = 1; // user that created message
|
||||
optional string ip_address = 2; // ip address of user that created message
|
||||
optional string game_name = 3; // client id of user that created the message
|
||||
optional string game_id = 4; // game number the message was sent to
|
||||
optional string message = 5; // raw message that was sent
|
||||
repeated string log_location = 6; // destination of message (ex: main room, game room, private chat)
|
||||
required uint32 date_range = 7; // the length of time (in minutes) to look back for
|
||||
optional uint32 maximum_results = 8; // the maximum number of query results
|
||||
|
||||
}
|
||||
|
|
|
@ -25,21 +25,23 @@ 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
|
||||
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
|
||||
RespTooManyRequests = 26; // Server refused to complete command because client has sent too many too quickly
|
||||
RespTooManyRequests = 26; // Server refused to complete command because client has sent too many too quickly
|
||||
RespPasswordTooShort = 27; // Server requires a decent password
|
||||
RespAccountNotActivated = 28; // Client attempted to log into a registered username but the account hasn't been activated
|
||||
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
|
||||
RespActivationAccepted = 31; // Server accepted a reg user activation token
|
||||
RespActivationFailed = 32; // Server didn't accept a reg user activation token
|
||||
RespRegistrationAcceptedNeedsActivation = 33; // Server accepted cient registration, but it will need token activation
|
||||
RespRegistrationFailed = 30; // Server accepted a reg request but failed to perform the registration
|
||||
RespActivationAccepted = 31; // Server accepted a reg user activation token
|
||||
RespActivationFailed = 32; // Server didn't accept a reg user activation token
|
||||
RespRegistrationAcceptedNeedsActivation =
|
||||
33; // Server accepted cient registration, but it will need token activation
|
||||
RespClientIdRequired = 34; // Server requires client to generate and send its client id before allowing access
|
||||
RespClientUpdateRequired = 35; // Client is missing features that the server is requiring
|
||||
RespServerFull = 36; // Server user limit reached
|
||||
RespEmailBlackListed = 37; // Server has blacklisted the email address provided for registration
|
||||
RespServerFull = 36; // Server user limit reached
|
||||
RespEmailBlackListed = 37; // Server has blacklisted the email address provided for registration
|
||||
}
|
||||
enum ResponseType {
|
||||
JOIN_ROOM = 1000;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
|
||||
message Response_AdjustMod{
|
||||
message Response_AdjustMod {
|
||||
extend Response {
|
||||
optional Response_AdjustMod ext = 1011;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto2";
|
|||
import "response.proto";
|
||||
import "serverinfo_ban.proto";
|
||||
|
||||
message Response_BanHistory{
|
||||
message Response_BanHistory {
|
||||
extend Response {
|
||||
optional Response_BanHistory ext = 1012;
|
||||
}
|
||||
|
|
|
@ -10,4 +10,3 @@ message Response_GetGamesOfUser {
|
|||
repeated ServerInfo_Room room_list = 1;
|
||||
repeated ServerInfo_Game game_list = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,5 +8,3 @@ message Response_GetUserInfo {
|
|||
}
|
||||
optional ServerInfo_User user_info = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ message Response_ListUsers {
|
|||
}
|
||||
repeated ServerInfo_User user_list = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@ message Response_ReplayDownload {
|
|||
}
|
||||
optional bytes replay_data = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto2";
|
|||
import "response.proto";
|
||||
import "serverinfo_chat_message.proto";
|
||||
|
||||
message Response_ViewLogHistory{
|
||||
message Response_ViewLogHistory {
|
||||
extend Response {
|
||||
optional Response_ViewLogHistory ext = 1015;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto2";
|
|||
import "response.proto";
|
||||
import "serverinfo_warning.proto";
|
||||
|
||||
message Response_WarnHistory{
|
||||
message Response_WarnHistory {
|
||||
extend Response {
|
||||
optional Response_WarnHistory ext = 1013;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
|
||||
message Response_WarnList{
|
||||
message Response_WarnList {
|
||||
extend Response {
|
||||
optional Response_WarnList ext = 1014;
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@ syntax = "proto2";
|
|||
* Historical ban information stored in the ban table
|
||||
*/
|
||||
message ServerInfo_Ban {
|
||||
required string admin_id = 1; // id of the staff member placing the ban
|
||||
required string admin_name = 2; // name of the staff member placing the ban
|
||||
required string ban_time = 3; // start time of the ban
|
||||
required string ban_length = 4; // amount of time in minutes the ban is for
|
||||
optional string ban_reason = 5; // reason seen only by moderation staff
|
||||
required string admin_id = 1; // id of the staff member placing the ban
|
||||
required string admin_name = 2; // name of the staff member placing the ban
|
||||
required string ban_time = 3; // start time of the ban
|
||||
required string ban_length = 4; // amount of time in minutes the ban is for
|
||||
optional string ban_reason = 5; // reason seen only by moderation staff
|
||||
optional string visible_reason = 6; // reason shown to the user
|
||||
}
|
||||
|
|
|
@ -5,12 +5,12 @@ syntax = "proto2";
|
|||
* These communications are also stored in the DB log table.
|
||||
*/
|
||||
message ServerInfo_ChatMessage {
|
||||
optional string time = 1; // time chat was sent
|
||||
optional string sender_id = 2; // id of sender
|
||||
optional string time = 1; // time chat was sent
|
||||
optional string sender_id = 2; // id of sender
|
||||
optional string sender_name = 3; // name of sender
|
||||
optional string sender_ip = 4; // ip of sender
|
||||
optional string message = 5; // message
|
||||
optional string sender_ip = 4; // ip of sender
|
||||
optional string message = 5; // message
|
||||
optional string target_type = 6; // target type (room,game,chat)
|
||||
optional string target_id = 7; // id of target
|
||||
optional string target_id = 7; // id of target
|
||||
optional string target_name = 8; // name of target
|
||||
}
|
||||
|
|
|
@ -3,4 +3,3 @@ message ServerInfo_GameType {
|
|||
optional sint32 game_type_id = 1;
|
||||
optional string description = 2;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ syntax = "proto2";
|
|||
* Historical warning information stored in the warnings table
|
||||
*/
|
||||
message ServerInfo_Warning {
|
||||
optional string user_name = 1; // name of user being warned
|
||||
optional string user_name = 1; // name of user being warned
|
||||
optional string admin_name = 2; // name of the moderator making the warning
|
||||
optional string reason = 3; // type of warning being placed
|
||||
optional string time_of = 4; // time of warning
|
||||
optional string reason = 3; // type of warning being placed
|
||||
optional string time_of = 4; // time of warning
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue