mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Allows moderators to promote users to mod and demote mod to user
This commit is contained in:
parent
b2ab2c6eba
commit
39fcabe921
15 changed files with 169 additions and 4 deletions
|
|
@ -106,6 +106,7 @@ SET(PROTO_FILES
|
|||
event_user_joined.proto
|
||||
event_user_left.proto
|
||||
event_user_message.proto
|
||||
event_notify_user.proto
|
||||
game_commands.proto
|
||||
game_event_container.proto
|
||||
game_event_context.proto
|
||||
|
|
@ -127,6 +128,7 @@ SET(PROTO_FILES
|
|||
response_register.proto
|
||||
response_replay_download.proto
|
||||
response_replay_list.proto
|
||||
response_adjust_mod.proto
|
||||
response.proto
|
||||
room_commands.proto
|
||||
room_event.proto
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ message AdminCommand {
|
|||
UPDATE_SERVER_MESSAGE = 1000;
|
||||
SHUTDOWN_SERVER = 1001;
|
||||
RELOAD_CONFIG = 1002;
|
||||
ADJUST_MOD = 1003;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
@ -26,3 +27,12 @@ message Command_ReloadConfig {
|
|||
optional Command_ReloadConfig ext = 1002;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_AdjustMod {
|
||||
extend AdminCommand {
|
||||
optional Command_AdjustMod ext = 1003;
|
||||
}
|
||||
required string user_name = 1;
|
||||
required bool should_be_mod = 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ message Event_ConnectionClosed {
|
|||
BANNED = 4;
|
||||
USERNAMEINVALID = 5;
|
||||
USER_LIMIT_REACHED = 6;
|
||||
DEMOTED = 7;
|
||||
}
|
||||
optional CloseReason reason = 1;
|
||||
optional string reason_str = 2;
|
||||
|
|
|
|||
14
common/pb/event_notify_user.proto
Normal file
14
common/pb/event_notify_user.proto
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import "session_event.proto";
|
||||
|
||||
message Event_NotifyUser {
|
||||
|
||||
enum NotificationType {
|
||||
PROMOTED = 1;
|
||||
}
|
||||
|
||||
extend SessionEvent {
|
||||
optional Event_NotifyUser ext = 1010;
|
||||
}
|
||||
optional NotificationType type = 1;
|
||||
|
||||
}
|
||||
|
|
@ -49,6 +49,7 @@ message Response {
|
|||
DECK_UPLOAD = 1008;
|
||||
REGISTER = 1009;
|
||||
ACTIVATE = 1010;
|
||||
ADJUST_MOD = 1011;
|
||||
REPLAY_LIST = 1100;
|
||||
REPLAY_DOWNLOAD = 1101;
|
||||
}
|
||||
|
|
|
|||
7
common/pb/response_adjust_mod.proto
Normal file
7
common/pb/response_adjust_mod.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "response.proto";
|
||||
|
||||
message Response_AdjustMod{
|
||||
extend Response {
|
||||
optional Response_AdjustMod ext = 1011;
|
||||
}
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ message SessionEvent {
|
|||
USER_JOINED = 1007;
|
||||
USER_LEFT = 1008;
|
||||
GAME_JOINED = 1009;
|
||||
NOTIFY_USER = 1010;
|
||||
REPLAY_ADDED = 1100;
|
||||
}
|
||||
extensions 100 to max;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue