diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-29 17:32:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-29 17:32:12 +0200 |
| commit | 5ecd440aedd5c0866daec2ab3f4d710f6e7c17f0 (patch) | |
| tree | 6cd27b236db89e3364ce5b3270fccd459af7571b /mumd/src/state.rs | |
| parent | c6a5774443099c747bce938e6f87299397819c2b (diff) | |
| parent | 4b12f3e87ed12ed5b070f23d73f8288cd5b109fd (diff) | |
| download | mum-5ecd440aedd5c0866daec2ab3f4d710f6e7c17f0.tar.gz | |
Merge pull request #75 from rbran/main
Finish the password implementation
Diffstat (limited to 'mumd/src/state.rs')
| -rw-r--r-- | mumd/src/state.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mumd/src/state.rs b/mumd/src/state.rs index ae7ae70..b279dfd 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -309,6 +309,7 @@ impl State { host, port, username, + password, accept_invalid_cert, } => { if !matches!(*self.phase_receiver().borrow(), StatePhase::Disconnected) { @@ -316,6 +317,7 @@ impl State { } let mut server = Server::new(); *server.username_mut() = Some(username); + *server.password_mut() = password; *server.host_mut() = Some(format!("{}:{}", host, port)); self.server = Some(server); self.phase_watcher @@ -610,6 +612,9 @@ impl State { pub fn username(&self) -> Option<&str> { self.server.as_ref().map(|e| e.username()).flatten() } + pub fn password(&self) -> Option<&str> { + self.server.as_ref().map(|e| e.password()).flatten() + } fn get_users_channel(&self, user_id: u32) -> u32 { self.server() .unwrap() |
