Struct ts3_query::QueryClient
source[−]pub struct QueryClient { /* private fields */ }
Expand description
Ts3 Query client with active connection
Implementations
Create new query connection
pub fn with_timeout<A: ToSocketAddrs>(
addr: A,
t_connect: Option<Duration>,
timeout: Option<Duration>
) -> Result<Self, Ts3Error>
pub fn with_timeout<A: ToSocketAddrs>(
addr: A,
t_connect: Option<Duration>,
timeout: Option<Duration>
) -> Result<Self, Ts3Error>
Create new query connection with timeouts
t_connect
is used for connection, timeout
for read/write operations
Set new maximum amount of lines to read per response, until DoS protection triggers.
Set new maximum amount of bytes per line to read until DoS protection triggers.
You may need to increase this for backup/restore of instances.
Rename this client, performs clientupdate client_nickname
escaping the name
Update channel name, performs channeledit channel_name
Update client description. If target is none updates this clients description.
Performs clientupdate CLIENT_DESCRIPTION
or clientedit clid=
with CLIENT_DESCRIPTION
if target is set.
Poke a client.
Performs clientpoke
pub fn send_message<T: AsRef<str>>(
&mut self,
target: MessageTarget,
msg: T
) -> Result<(), Ts3Error>
pub fn send_message<T: AsRef<str>>(
&mut self,
target: MessageTarget,
msg: T
) -> Result<(), Ts3Error>
Send chat message
Perform a raw command, returns its response as raw value. (No unescaping is performed.)
You need to escape the command properly.
Performs whoami
Returns a hashmap of entries. Values are unescaped if set.
Login with provided data
On drop queryclient issues a logout
Select server to perform commands on, by port
Performs use port
Move client to channel with optional channel password
Performs clientmove
Kick client with specified message from channel/server. Message can’t be longer than 40 characters.
Performs clientkick
Create file directory in channel, has to be a valid path starting with /
Performs ftcreatedir
Delete File/Folder in channel, acts recursive on folders
Example: /My Directory
deletes everything inside that directory.
Performs ftdeletefile
Low-cost connection check
Performs whoami
command without parsing
Select server to perform commands on, by server id.
Performs use sid
pub fn server_group_del_clients(
&mut self,
group: ServerGroupID,
cldbid: &[usize]
) -> Result<(), Ts3Error>
pub fn server_group_del_clients(
&mut self,
group: ServerGroupID,
cldbid: &[usize]
) -> Result<(), Ts3Error>
Performs servergroupdelclient
Removes all client-db-ids in cldbid
from the specified group
id.
pub fn server_group_add_clients(
&mut self,
group: ServerGroupID,
cldbid: &[usize]
) -> Result<(), Ts3Error>
pub fn server_group_add_clients(
&mut self,
group: ServerGroupID,
cldbid: &[usize]
) -> Result<(), Ts3Error>
Performs servergroupaddclient
Ads all specified cldbid
clients to group
.
Returns a list of online clients with full infos. Visiblity depends on current permissions. Values are unescaped where applicable.
Performs clientlist -uid -away -voice -times -groups -info -country -ip -badges
Returns a list of online clients. Visiblity depends on current permissions. Values are unescaped where applicable.
Performs clientlist
Returns a list of channels. Values are unescaped where applicable.
Performs channellist
Returns a list of channels with full infos. Values are unescaped where applicable.
Performs channellist -topic -flags -voice -limits -icon -secondsempty
Deletes a channel
Performs channeldelete cid={} force={}
Creates a channel
Performs channelcreate
Returns a list of server groups. May contain templates and query groups if permitted. Values are unescaped where applicable.
Performs servergrouplist
pub fn servergroup_client_cldbids(
&mut self,
group: ServerGroupID
) -> Result<Vec<usize>, Ts3Error>
pub fn servergroup_client_cldbids(
&mut self,
group: ServerGroupID
) -> Result<Vec<usize>, Ts3Error>
Get a list of client-DB-IDs for a given server group ID
See servergroupclientlist