From 4b12f3e87ed12ed5b070f23d73f8288cd5b109fd Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Sun, 28 Mar 2021 15:58:16 -0300 Subject: Finish the password implementation --- mumd/src/state/server.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mumd/src/state/server.rs') diff --git a/mumd/src/state/server.rs b/mumd/src/state/server.rs index 8a256b6..c9f8a69 100644 --- a/mumd/src/state/server.rs +++ b/mumd/src/state/server.rs @@ -14,6 +14,7 @@ pub struct Server { pub welcome_text: Option, username: Option, + password: Option, session_id: Option, muted: bool, deafened: bool, @@ -28,6 +29,7 @@ impl Server { users: HashMap::new(), welcome_text: None, username: None, + password: None, session_id: None, muted: false, deafened: false, @@ -114,6 +116,14 @@ impl Server { &mut self.username } + pub fn password(&self) -> Option<&str> { + self.password.as_deref() + } + + pub fn password_mut(&mut self) -> &mut Option { + &mut self.password + } + pub fn muted(&self) -> bool { self.muted } -- cgit v1.2.1