From 9f4c05059f1990a23995e3363f88ab753187042d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 18 Oct 2020 02:08:32 +0200 Subject: parse user state diff and handle connecting clients --- mumlib/src/state.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'mumlib') 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, + pub hash: Option, + pub name: Option, + pub priority_speaker: Option, + pub recording: Option, + + pub suppress: Option, // by me + pub self_mute: Option, // by self + pub self_deaf: Option, // by self + pub mute: Option, // by admin + pub deaf: Option, // by admin +} + +impl UserDiff { + pub fn new() -> Self { + UserDiff::default() + } +} -- cgit v1.2.1