aboutsummaryrefslogtreecommitdiff
path: root/core/src/pas_server_commands.rs
blob: 8d152611e7336fd86ffb49461b6f386e00752d16 (plain) (blame)
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
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) {

    }
}