diff options
Diffstat (limited to 'src/bin/client/main.rs')
| -rw-r--r-- | src/bin/client/main.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/bin/client/main.rs b/src/bin/client/main.rs index 2ff6f55..c95880d 100644 --- a/src/bin/client/main.rs +++ b/src/bin/client/main.rs | |||
| @@ -1,12 +1,22 @@ | |||
| 1 | #[macro_use] | 1 | #[macro_use] |
| 2 | mod macros; | 2 | mod macros; |
| 3 | mod repl; | ||
| 4 | mod database; | ||
| 5 | mod connection; | 3 | mod connection; |
| 4 | mod database; | ||
| 5 | mod games; | ||
| 6 | mod repl; | ||
| 6 | 7 | ||
| 7 | use repl::ClientState; | 8 | use repl::ClientState; |
| 8 | 9 | ||
| 9 | fn main() { | 10 | fn main() { |
| 11 | let args: Vec<String> = std::env::args().collect(); | ||
| 12 | let unsafe_mode = args.iter().any(|arg| arg == "--unsafe"); | ||
| 13 | |||
| 14 | if unsafe_mode { | ||
| 15 | println!("WARNING: Running in UNSAFE mode - certificate verification disabled!"); | ||
| 16 | } | ||
| 17 | |||
| 18 | connection::set_unsafe_mode(unsafe_mode); | ||
| 19 | |||
| 10 | let mut state = ClientState::new(); | 20 | let mut state = ClientState::new(); |
| 11 | if let Some(host) = state.addr.clone() { | 21 | if let Some(host) = state.addr.clone() { |
| 12 | state.connect_to(&host); | 22 | state.connect_to(&host); |
