aboutsummaryrefslogtreecommitdiff
path: root/core/src/pas_server_commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/pas_server_commands.rs')
-rw-r--r--core/src/pas_server_commands.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/src/pas_server_commands.rs b/core/src/pas_server_commands.rs
new file mode 100644
index 0000000..8d15261
--- /dev/null
+++ b/core/src/pas_server_commands.rs
@@ -0,0 +1,36 @@
+use std::time::Duration;
+use crate::pads_server::{PadServer, ServerMessage};
+
+impl PadServer {
+
+ // TODO :: 可能需要返回是否成功
+ pub fn send_message (&self, player_index: i32, msg: ServerMessage) {
+
+ }
+
+ // TODO :: 可能需要返回是否成功
+ pub fn kick (&self, player_index: i32, ban: bool) {
+ self.send_message(player_index, ServerMessage::Kick);
+
+ // TODO :: 封禁模式启动
+ if ban {
+
+ }
+ }
+
+ pub fn shock (&self, player_index: i32, duration: Duration, value: f64) {
+ self.send_message(player_index, ServerMessage::Shock(duration, value));
+ }
+
+ pub fn set_ignore_control (&self, player_index: i32, ignore: bool) {
+
+ }
+
+ pub fn set_ignore_message (&self, player_index: i32, ignore: bool) {
+
+ }
+
+ pub fn set_ignore_command (&self, player_index: i32, ignore: bool) {
+
+ }
+} \ No newline at end of file