Expose ts-server password, fix channel-password
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
This commit is contained in:
parent
3e5d6a56b0
commit
0bb7e5e2d2
2 changed files with 8 additions and 1 deletions
|
@ -5,6 +5,9 @@ teamspeak_server = "IP:PORT" # NO tsdns
|
|||
# identity, should change this
|
||||
teamspeak_identity = "MG0DAgeAAgEgAiAIXJBlj1hQbaH0Eq0DuLlCmH8bl+veTAO2+k9EQjEYSgIgNnImcmKo7ls5mExb6skfK2Tw+u54aeDr0OP1ITsC/50CIA8M5nmDBnmDM/gZ//4AAAAAAAAAAAAAAAAAAAAZRzOI"
|
||||
|
||||
# teamspeak server password
|
||||
# teamspeak_server_password = "my secret"
|
||||
|
||||
# use either of the following
|
||||
# join ts-channel by ID
|
||||
# teamspeak_channel_id = 1
|
||||
|
|
|
@ -38,6 +38,7 @@ struct Config {
|
|||
discord_token: String,
|
||||
teamspeak_server: String,
|
||||
teamspeak_identity: String,
|
||||
teamspeak_server_password: Option<String>,
|
||||
teamspeak_channel_id: Option<u64>,
|
||||
teamspeak_channel_name: Option<String>,
|
||||
teamspeak_channel_password: Option<String>,
|
||||
|
@ -188,9 +189,12 @@ async fn main() -> Result<()> {
|
|||
if let Some(channel) = config.teamspeak_channel_name {
|
||||
con_config = con_config.channel(channel);
|
||||
}
|
||||
if let Some(password) = config.teamspeak_channel_password {
|
||||
if let Some(password) = config.teamspeak_server_password {
|
||||
con_config = con_config.password(password);
|
||||
}
|
||||
if let Some(password) = config.teamspeak_channel_password {
|
||||
con_config = con_config.channel_password(password);
|
||||
}
|
||||
|
||||
// teamspeak: Optionally set the key of this client, otherwise a new key is generated.
|
||||
let id = Identity::new_from_str(&config.teamspeak_identity).expect("Can't load identity!");
|
||||
|
|
Loading…
Reference in a new issue