-
Notifications
You must be signed in to change notification settings - Fork 0
/
dipix-bot.proto
47 lines (41 loc) · 1.24 KB
/
dipix-bot.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
syntax = "proto3";
message Empty {}
message ChatMessage {
string sender = 1; // nickname
string content = 2; // message content
}
message ConsoleCommand {
string cmd = 1;
}
message ConsoleLog {
string raw = 1;
}
// A client-sided methods to open server-sided sctreams
// Also push messages and commands
//! DEPRECATED
// service ChatMessageService {
// rpc ConnectChat(Empty) returns (stream ChatMessage);
// rpc ConnectConsole(Empty) returns (stream ConsoleLog);
// rpc SendMessage(ChatMessage) returns (Empty);
// rpc SendCommand(ConsoleCommand) returns (Empty);
// }
message PlayerList {
repeated string players = 1;
}
//! DEPRECATED
// service Stats {
// rpc PingServer(Empty) returns (Empty); // It works!
// rpc GetPlayers(Empty) returns (PlayerList); // Request a player list
// }
// Data requested from bot by gameserver
// Server - Bot; Client - Game
service MinecraftToBot {
rpc MessagePool(stream ChatMessage) returns (stream ChatMessage);
rpc ConsolePool(stream ConsoleLog) returns (stream ConsoleCommand);
}
// Data required or sent by bot
// Server - Game; Client - Bot
service BotToMinecraft {
rpc GetPlayers(Empty) returns (PlayerList); // Request a player list
rpc Reconnect(Empty) returns (Empty); // Signal to reinit streams
}