mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[Server/Client/Protocol] Reporting users + moderation queue functionality
Took 6 minutes Took 3 minutes Took 8 seconds Took 11 minutes Took 12 minutes Took 7 minutes Took 15 seconds Took 2 minutes Took 1 minute Took 30 seconds Took 16 seconds
This commit is contained in:
parent
9eafd90a91
commit
b8a70c48a4
58 changed files with 3364 additions and 17 deletions
|
|
@ -35,10 +35,20 @@ set(PROTO_FILES
|
|||
command_ready_start.proto
|
||||
command_replay_delete_match.proto
|
||||
command_replay_download.proto
|
||||
command_replay_download_by_game_id.proto
|
||||
command_replay_get_code.proto
|
||||
command_replay_list.proto
|
||||
command_replay_modify_match.proto
|
||||
command_replay_submit_code.proto
|
||||
command_report.proto
|
||||
command_report_add_comment.proto
|
||||
command_report_assign.proto
|
||||
command_report_details.proto
|
||||
command_report_list.proto
|
||||
command_report_my_list.proto
|
||||
command_report_resolve.proto
|
||||
command_report_stats.proto
|
||||
command_report_user_info.proto
|
||||
command_reveal_cards.proto
|
||||
command_reverse_turn.proto
|
||||
command_roll_die.proto
|
||||
|
|
@ -138,8 +148,14 @@ set(PROTO_FILES
|
|||
response_password_salt.proto
|
||||
response_register.proto
|
||||
response_replay_download.proto
|
||||
response_replay_download_by_game_id.proto
|
||||
response_replay_get_code.proto
|
||||
response_replay_list.proto
|
||||
response_report_details.proto
|
||||
response_report_list.proto
|
||||
response_report_my_list.proto
|
||||
response_report_stats.proto
|
||||
response_report_user_info.proto
|
||||
response_viewlog_history.proto
|
||||
response_warn_history.proto
|
||||
response_warn_list.proto
|
||||
|
|
@ -160,6 +176,7 @@ set(PROTO_FILES
|
|||
serverinfo_playerproperties.proto
|
||||
serverinfo_replay.proto
|
||||
serverinfo_replay_match.proto
|
||||
serverinfo_report.proto
|
||||
serverinfo_room.proto
|
||||
serverinfo_user.proto
|
||||
serverinfo_warning.proto
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "moderator_commands.proto";
|
||||
|
||||
message Command_ReplayDownloadByGameId {
|
||||
extend ModeratorCommand {
|
||||
optional Command_ReplayDownloadByGameId ext = 1203;
|
||||
}
|
||||
required sint32 game_id = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
syntax = "proto2";
|
||||
import "session_commands.proto";
|
||||
|
||||
message Command_Report {
|
||||
extend SessionCommand {
|
||||
optional Command_Report ext = 1200;
|
||||
}
|
||||
optional string reported_user = 1;
|
||||
optional int32 game_id = 2;
|
||||
optional string category = 3;
|
||||
optional string description = 4;
|
||||
optional string chat_log = 5;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "session_commands.proto";
|
||||
|
||||
message Command_ReportAddComment {
|
||||
extend SessionCommand {
|
||||
optional Command_ReportAddComment ext = 1205;
|
||||
}
|
||||
required int32 report_id = 1;
|
||||
required string comment = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "moderator_commands.proto";
|
||||
|
||||
message Command_ReportAssign {
|
||||
extend ModeratorCommand {
|
||||
optional Command_ReportAssign ext = 1201;
|
||||
}
|
||||
required int32 report_id = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "session_commands.proto";
|
||||
|
||||
message Command_ReportDetails {
|
||||
extend SessionCommand {
|
||||
optional Command_ReportDetails ext = 1206;
|
||||
}
|
||||
required int32 report_id = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "moderator_commands.proto";
|
||||
|
||||
message Command_ReportList {
|
||||
extend ModeratorCommand {
|
||||
optional Command_ReportList ext = 1200;
|
||||
}
|
||||
optional bool unresolved_only = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
syntax = "proto2";
|
||||
import "session_commands.proto";
|
||||
|
||||
message Command_ReportMyList {
|
||||
extend SessionCommand {
|
||||
optional Command_ReportMyList ext = 1204;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
syntax = "proto2";
|
||||
import "moderator_commands.proto";
|
||||
|
||||
message Command_ReportResolve {
|
||||
extend ModeratorCommand {
|
||||
optional Command_ReportResolve ext = 1202;
|
||||
}
|
||||
required int32 report_id = 1;
|
||||
optional string resolution_note = 2;
|
||||
optional bool dismissed = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
syntax = "proto2";
|
||||
import "moderator_commands.proto";
|
||||
|
||||
message Command_ReportStats {
|
||||
extend ModeratorCommand {
|
||||
optional Command_ReportStats ext = 1205;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "moderator_commands.proto";
|
||||
|
||||
message Command_ReportUserInfo {
|
||||
extend ModeratorCommand {
|
||||
optional Command_ReportUserInfo ext = 1204;
|
||||
}
|
||||
optional string user_name = 1;
|
||||
}
|
||||
|
|
@ -9,6 +9,8 @@ message Event_NotifyUser {
|
|||
WARNING = 2;
|
||||
IDLEWARNING = 3;
|
||||
CUSTOM = 4;
|
||||
REPORT_RESOLVED = 5;
|
||||
REPORT_COMMENT = 6;
|
||||
}
|
||||
|
||||
extend SessionEvent {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ message ModeratorCommand {
|
|||
ADD_CARD_ART_RULE = 1010;
|
||||
REMOVE_CARD_ART_RULE = 1011;
|
||||
LIST_CARD_ART_RULES = 1012;
|
||||
REPORT_LIST = 1200;
|
||||
REPORT_ASSIGN = 1201;
|
||||
REPORT_RESOLVE = 1202;
|
||||
REPLAY_DOWNLOAD_BY_GAME_ID = 1203;
|
||||
REPORT_USER_INFO = 1204;
|
||||
REPORT_STATS = 1205;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
|
||||
message Response_ReplayDownloadByGameId {
|
||||
extend Response {
|
||||
optional Response_ReplayDownloadByGameId ext = 1203;
|
||||
}
|
||||
optional bytes replay_data = 1;
|
||||
optional sint32 replay_id = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
import "serverinfo_report.proto";
|
||||
|
||||
message Response_ReportDetails {
|
||||
extend Response {
|
||||
optional Response_ReportDetails ext = 1214;
|
||||
}
|
||||
optional ServerInfo_Report report = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
import "serverinfo_report.proto";
|
||||
|
||||
message Response_ReportList {
|
||||
extend Response {
|
||||
optional Response_ReportList ext = 1210;
|
||||
}
|
||||
repeated ServerInfo_Report reports = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
import "serverinfo_report.proto";
|
||||
|
||||
message Response_ReportMyList {
|
||||
extend Response {
|
||||
optional Response_ReportMyList ext = 1213;
|
||||
}
|
||||
repeated ServerInfo_Report reports = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
|
||||
message Response_ReportStats {
|
||||
extend Response {
|
||||
optional Response_ReportStats ext = 1212;
|
||||
}
|
||||
|
||||
optional int32 total_reports = 1;
|
||||
optional int32 total_pending = 2;
|
||||
optional int32 total_assigned = 3;
|
||||
optional int32 total_resolved = 4;
|
||||
|
||||
optional int32 reports_last_24h = 5;
|
||||
optional int32 reports_last_7d = 6;
|
||||
optional int32 reports_last_30d = 7;
|
||||
|
||||
optional double avg_resolution_hours = 8;
|
||||
|
||||
optional int32 reports_this_week = 9;
|
||||
optional int32 reports_last_week = 10;
|
||||
|
||||
repeated ReportCategoryCount category_counts = 11;
|
||||
repeated ReportTopUser top_reported_users = 12;
|
||||
repeated ReportTopUser top_reporters = 13;
|
||||
}
|
||||
|
||||
message ReportCategoryCount {
|
||||
optional string category = 1;
|
||||
optional int32 count = 2;
|
||||
}
|
||||
|
||||
message ReportTopUser {
|
||||
optional string user_name = 1;
|
||||
optional int32 count = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
syntax = "proto2";
|
||||
import "response.proto";
|
||||
import "serverinfo_report.proto";
|
||||
|
||||
message Response_ReportUserInfo {
|
||||
extend Response {
|
||||
optional Response_ReportUserInfo ext = 1211;
|
||||
}
|
||||
|
||||
optional string user_name = 1;
|
||||
optional int32 total_reports = 2;
|
||||
optional int32 total_bans = 3;
|
||||
optional int32 total_warns = 4;
|
||||
optional int64 registration_time = 5;
|
||||
optional bool is_admin = 6;
|
||||
optional bool is_active = 7;
|
||||
optional string admin_notes = 8;
|
||||
repeated ServerInfo_Report recent_reports = 9;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
syntax = "proto2";
|
||||
|
||||
message ServerInfo_ReportComment {
|
||||
optional string author_name = 1;
|
||||
optional string comment_text = 2;
|
||||
optional int64 comment_time = 3;
|
||||
optional bool is_moderator = 4;
|
||||
}
|
||||
|
||||
message ServerInfo_Report {
|
||||
optional int32 report_id = 1;
|
||||
|
||||
optional string reporter_name = 2;
|
||||
optional string reported_user_name = 3;
|
||||
|
||||
optional int32 game_id = 4;
|
||||
optional int32 replay_id = 5;
|
||||
optional int32 room_id = 6;
|
||||
|
||||
optional string category = 7;
|
||||
optional string status = 8;
|
||||
|
||||
optional string description = 9;
|
||||
|
||||
optional int64 report_time = 10;
|
||||
|
||||
optional string assigned_mod_name = 11;
|
||||
|
||||
optional int64 resolution_time = 12;
|
||||
|
||||
repeated ServerInfo_ReportComment comments = 13;
|
||||
|
||||
optional string chat_log = 14;
|
||||
|
||||
optional string resolution_note = 15;
|
||||
}
|
||||
|
|
@ -34,6 +34,10 @@ message SessionCommand {
|
|||
REPLAY_DELETE_MATCH = 1103;
|
||||
REPLAY_GET_CODE = 1104;
|
||||
REPLAY_SUBMIT_CODE = 1105;
|
||||
REPORT = 1200;
|
||||
REPORT_MY_LIST = 1204;
|
||||
REPORT_ADD_COMMENT = 1205;
|
||||
REPORT_DETAILS = 1206;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue