aboutsummaryrefslogtreecommitdiffstats
path: root/src/bot/master.rs
diff options
context:
space:
mode:
authorJokler <jokler@protonmail.com>2020-03-22 16:02:36 +0100
committerJokler <jokler@protonmail.com>2020-03-22 16:29:53 +0100
commite71c6356f53538a20b711510e5d558d969474ad5 (patch)
tree3f38be51ce65d2d82409f29580c3155a9a911d0c /src/bot/master.rs
parent402b71b5eb83a23d613d217e63517dfa59017df6 (diff)
downloadpokebot-e71c6356f53538a20b711510e5d558d969474ad5.tar.gz
pokebot-e71c6356f53538a20b711510e5d558d969474ad5.zip
Fixed id generation for first time setup
Diffstat (limited to 'src/bot/master.rs')
-rw-r--r--src/bot/master.rs8
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 {