feat: integrate chat voice and diagnostics client
This commit is contained in:
@@ -25,6 +25,35 @@ pub struct ChannelInfo {
|
||||
pub order: i64,
|
||||
/// True when the server marks the channel as password-protected.
|
||||
pub has_password: bool,
|
||||
/// Talk power threshold required to speak in this channel.
|
||||
/// `None` means no talk-power restriction.
|
||||
pub needed_talk_power: Option<i32>,
|
||||
}
|
||||
|
||||
/// The target scope of a text message (mirrors TS3 `TextMessageTargetMode`).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum MessageTarget {
|
||||
/// Broadcast to entire server.
|
||||
Server,
|
||||
/// Broadcast to current channel.
|
||||
Channel,
|
||||
/// Private message to a specific client.
|
||||
Client(u64),
|
||||
/// Poke a specific client.
|
||||
Poke(u64),
|
||||
}
|
||||
|
||||
/// An in-channel text message from a specific client.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ChatMessage {
|
||||
/// The client id of the sender.
|
||||
pub sender_id: ClientId,
|
||||
/// Nickname of the sender, preserved verbatim.
|
||||
pub sender_name: String,
|
||||
/// Message content, preserved verbatim.
|
||||
pub message: String,
|
||||
/// Target scope of this message.
|
||||
pub target: MessageTarget,
|
||||
}
|
||||
|
||||
/// One connected client on the server.
|
||||
@@ -44,6 +73,10 @@ pub struct ClientInfo {
|
||||
pub is_speaking: bool,
|
||||
/// True for TeamSpeak ServerQuery clients.
|
||||
pub is_server_query: bool,
|
||||
/// Current talk power value assigned by the server.
|
||||
pub talk_power: i32,
|
||||
/// True when the server has granted talk power regardless of numeric value.
|
||||
pub talk_power_granted: bool,
|
||||
}
|
||||
|
||||
/// Snapshot of the server's published state at a moment in time.
|
||||
|
||||
Reference in New Issue
Block a user