aboutsummaryrefslogtreecommitdiffstats
path: root/mumlib
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-10-18 02:08:32 +0200
committerGustav Sörnäs <gustav@sornas.net>2020-10-21 01:07:43 +0200
commit9f4c05059f1990a23995e3363f88ab753187042d (patch)
tree07c7e7f76cac4b0c7960e3e23913724b1557b4d4 /mumlib
parentd58c2aad6844789c24b93387f9b61e4ab8d2a2d3 (diff)
downloadmum-9f4c05059f1990a23995e3363f88ab753187042d.tar.gz
parse user state diff and handle connecting clients
Diffstat (limited to 'mumlib')
-rw-r--r--mumlib/src/state.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/mumlib/src/state.rs b/mumlib/src/state.rs
index b09726e..ef25a79 100644
--- a/mumlib/src/state.rs
+++ b/mumlib/src/state.rs
@@ -134,3 +134,24 @@ impl Display for User {
write!(f, "{}", self.name)
}
}
+
+#[derive(Debug, Default)]
+pub struct UserDiff {
+ pub comment: Option<String>,
+ pub hash: Option<String>,
+ pub name: Option<String>,
+ pub priority_speaker: Option<bool>,
+ pub recording: Option<bool>,
+
+ pub suppress: Option<bool>, // by me
+ pub self_mute: Option<bool>, // by self
+ pub self_deaf: Option<bool>, // by self
+ pub mute: Option<bool>, // by admin
+ pub deaf: Option<bool>, // by admin
+}
+
+impl UserDiff {
+ pub fn new() -> Self {
+ UserDiff::default()
+ }
+}