From e71c6356f53538a20b711510e5d558d969474ad5 Mon Sep 17 00:00:00 2001 From: Jokler Date: Sun, 22 Mar 2020 16:02:36 +0100 Subject: Fixed id generation for first time setup --- src/bot/master.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/bot') diff --git a/src/bot/master.rs b/src/bot/master.rs index 755aaa1..7a1201f 100644 --- a/src/bot/master.rs +++ b/src/bot/master.rs @@ -40,7 +40,7 @@ impl MasterBot { let mut con_config = ConnectOptions::new(args.address.clone()) .version(tsclientlib::Version::Linux_3_3_2) .name(args.master_name.clone()) - .identity(args.id) + .identity(args.id.expect("identity should exist")) .log_commands(args.verbose >= 1) .log_packets(args.verbose >= 2) .log_udp_packets(args.verbose >= 3); @@ -59,7 +59,7 @@ impl MasterBot { master_name: args.master_name, address: args.address, names: args.names, - ids: args.ids, + ids: args.ids.expect("identies should exists"), local: args.local, verbose: args.verbose, }); @@ -283,8 +283,8 @@ pub struct MasterArgs { pub domain: String, pub bind_address: String, pub names: Vec, - pub id: Identity, - pub ids: Vec, + pub id: Option, + pub ids: Option>, } fn default_name() -> String { -- cgit v1.2.3-70-g09d2