mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
replays expire after two weeks, lock can be toggled to prevent that
This commit is contained in:
parent
a876a0bf5f
commit
acb03c2bf2
15 changed files with 127 additions and 23 deletions
|
|
@ -1,3 +1,4 @@
|
|||
[Dolphin]
|
||||
Timestamp=2012,1,1,23,11,32
|
||||
Timestamp=2012,3,4,11,22,24
|
||||
Version=2
|
||||
ViewMode=1
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ SET(PROTO_FILES
|
|||
command_ready_start.proto
|
||||
command_replay_list.proto
|
||||
command_replay_download.proto
|
||||
command_replay_modify_match.proto
|
||||
command_reveal_cards.proto
|
||||
command_roll_die.proto
|
||||
command_set_active_phase.proto
|
||||
|
|
|
|||
10
common/pb/command_replay_modify_match.proto
Normal file
10
common/pb/command_replay_modify_match.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "session_commands.proto";
|
||||
|
||||
message Command_ReplayModifyMatch {
|
||||
extend SessionCommand {
|
||||
optional Command_ReplayModifyMatch ext = 1102;
|
||||
}
|
||||
optional sint32 game_id = 1 [default = -1];
|
||||
optional bool do_not_hide = 2;
|
||||
}
|
||||
|
||||
|
|
@ -9,4 +9,5 @@ message ServerInfo_ReplayMatch {
|
|||
optional uint32 length = 5;
|
||||
optional string game_name = 6;
|
||||
repeated string player_names = 7;
|
||||
optional bool do_not_hide = 8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ message SessionCommand {
|
|||
JOIN_ROOM = 1015;
|
||||
REPLAY_LIST = 1100;
|
||||
REPLAY_DOWNLOAD = 1101;
|
||||
REPLAY_MODIFY_MATCH = 1102;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include "pb/command_deck_del.pb.h"
|
||||
#include "pb/command_replay_list.pb.h"
|
||||
#include "pb/command_replay_download.pb.h"
|
||||
#include "pb/command_replay_modify_match.pb.h"
|
||||
#include "pb/response.pb.h"
|
||||
#include "pb/response_login.pb.h"
|
||||
#include "pb/response_list_users.pb.h"
|
||||
|
|
@ -241,6 +242,7 @@ Response::ResponseCode Server_ProtocolHandler::processSessionCommandContainer(co
|
|||
case SessionCommand::DECK_DOWNLOAD: resp = cmdDeckDownload(sc.GetExtension(Command_DeckDownload::ext), rc); break;
|
||||
case SessionCommand::REPLAY_LIST: resp = cmdReplayList(sc.GetExtension(Command_ReplayList::ext), rc); break;
|
||||
case SessionCommand::REPLAY_DOWNLOAD: resp = cmdReplayDownload(sc.GetExtension(Command_ReplayDownload::ext), rc); break;
|
||||
case SessionCommand::REPLAY_MODIFY_MATCH: resp = cmdReplayModifyMatch(sc.GetExtension(Command_ReplayModifyMatch::ext), rc); break;
|
||||
case SessionCommand::GET_GAMES_OF_USER: resp = cmdGetGamesOfUser(sc.GetExtension(Command_GetGamesOfUser::ext), rc); break;
|
||||
case SessionCommand::GET_USER_INFO: resp = cmdGetUserInfo(sc.GetExtension(Command_GetUserInfo::ext), rc); break;
|
||||
case SessionCommand::LIST_ROOMS: resp = cmdListRooms(sc.GetExtension(Command_ListRooms::ext), rc); break;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class Command_DeckDownload;
|
|||
class Command_DeckUpload;
|
||||
class Command_ReplayList;
|
||||
class Command_ReplayDownload;
|
||||
class Command_ReplayModifyMatch;
|
||||
class Command_ListRooms;
|
||||
class Command_JoinRoom;
|
||||
class Command_LeaveRoom;
|
||||
|
|
@ -123,6 +124,7 @@ private:
|
|||
virtual Response::ResponseCode cmdDeckDownload(const Command_DeckDownload &cmd, ResponseContainer &rc) = 0;
|
||||
virtual Response::ResponseCode cmdReplayList(const Command_ReplayList &cmd, ResponseContainer &rc) = 0;
|
||||
virtual Response::ResponseCode cmdReplayDownload(const Command_ReplayDownload &cmd, ResponseContainer &rc) = 0;
|
||||
virtual Response::ResponseCode cmdReplayModifyMatch(const Command_ReplayModifyMatch &cmd, ResponseContainer &rc) = 0;
|
||||
Response::ResponseCode cmdGetGamesOfUser(const Command_GetGamesOfUser &cmd, ResponseContainer &rc);
|
||||
Response::ResponseCode cmdGetUserInfo(const Command_GetUserInfo &cmd, ResponseContainer &rc);
|
||||
Response::ResponseCode cmdListRooms(const Command_ListRooms &cmd, ResponseContainer &rc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue