aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/state/user.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mumd/src/state/user.rs')
-rw-r--r--mumd/src/state/user.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/mumd/src/state/user.rs b/mumd/src/state/user.rs
index 679d0ff..848208c 100644
--- a/mumd/src/state/user.rs
+++ b/mumd/src/state/user.rs
@@ -1,4 +1,3 @@
-use log::*;
use mumble_protocol::control::msgs;
use serde::{Deserialize, Serialize};
@@ -80,7 +79,6 @@ impl User {
}
pub fn apply_user_diff(&mut self, diff: &mumlib::state::UserDiff) {
- debug!("applying user diff\n{:#?}", diff);
if let Some(comment) = diff.comment.clone() {
self.comment = Some(comment);
}
@@ -111,13 +109,11 @@ impl User {
if let Some(deaf) = diff.deaf {
self.deaf = deaf;
}
-
if let Some(channel_id) = diff.channel_id {
self.channel = channel_id;
}
}
-
pub fn name(&self) -> &str {
&self.name
}
@@ -125,6 +121,14 @@ impl User {
pub fn channel(&self) -> u32 {
self.channel
}
+
+ pub fn self_mute(&self) -> bool {
+ self.self_mute
+ }
+
+ pub fn self_deaf(&self) -> bool {
+ self.self_deaf
+ }
}
impl From<&User> for mumlib::state::User {