diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2025-04-14 13:49:55 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2025-04-14 13:49:55 +0800 |
| commit | a845ce5452debc9f3bb7a674b4630e88d8382cc8 (patch) | |
| tree | d4c5d8a9fe96d370abc09d444e928c29eb38bd13 /core/src/pas_server_commands.rs | |
| parent | 3cc364653fcadf028af9938c449f105393893443 (diff) | |
修改两个Message的枚举值类型
修复了遗留的 Hash 错误
Diffstat (limited to 'core/src/pas_server_commands.rs')
| -rw-r--r-- | core/src/pas_server_commands.rs | 36 |
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 |
