diff options
| author | Rubens Brandao <git@rubens.io> | 2021-03-28 20:58:16 +0200 |
|---|---|---|
| committer | Rubens Brandao <git@rubens.io> | 2021-03-28 20:58:16 +0200 |
| commit | 4b12f3e87ed12ed5b070f23d73f8288cd5b109fd (patch) | |
| tree | 1f0ebc6d0a0af9f657badcc6eebe1d158ac6f83d /mumd/src/state.rs | |
| parent | 8501432530f19cb2be86815697c82abbe4482275 (diff) | |
| download | mum-4b12f3e87ed12ed5b070f23d73f8288cd5b109fd.tar.gz | |
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() |
