diff options
Diffstat (limited to 'mumd/src/state')
| -rw-r--r-- | mumd/src/state/server.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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<String>, username: Option<String>, + password: Option<String>, session_id: Option<u32>, 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<String> { + &mut self.password + } + pub fn muted(&self) -> bool { self.muted } |
