diff options
| author | Jokler <jokler@protonmail.com> | 2020-03-22 16:56:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-22 16:56:17 +0100 |
| commit | 08794f7f7bfd226c4b68b141be14e2405ce61d03 (patch) | |
| tree | 3f38be51ce65d2d82409f29580c3155a9a911d0c /src/bot/master.rs | |
| parent | 402b71b5eb83a23d613d217e63517dfa59017df6 (diff) | |
| parent | e71c6356f53538a20b711510e5d558d969474ad5 (diff) | |
| download | pokebot-08794f7f7bfd226c4b68b141be14e2405ce61d03.tar.gz pokebot-08794f7f7bfd226c4b68b141be14e2405ce61d03.zip | |
Merge pull request #47 from Mavulp/fix-id-generation
Fixed id generation for first time setup
Diffstat (limited to 'src/bot/master.rs')
| -rw-r--r-- | src/bot/master.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<String>, - pub id: Identity, - pub ids: Vec<Identity>, + pub id: Option<Identity>, + pub ids: Option<Vec<Identity>>, } fn default_name() -> String { |
