From 6e5edfc33b54a20ed04ef270aa39b1aa763faeea Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Thu, 12 Nov 2020 22:56:57 +0100 Subject: remove commented out code --- mumd/src/state.rs | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'mumd') diff --git a/mumd/src/state.rs b/mumd/src/state.rs index 0395b4f..2cd3931 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -450,7 +450,9 @@ impl State { warn!("{} moved to invalid channel {}", &user.name(), channel_id); } } - + + // send notification if a user muted/unmuted + //TODO our channel only let notify_desc = match (mute, deaf) { (Some(true), Some(true)) => Some(format!("{} muted and deafend themselves", &user.name())), (Some(false), Some(false)) => Some(format!("{} unmuted and undeafend themselves", &user.name())), @@ -462,23 +464,6 @@ impl State { (Some(false), Some(true)) => Some(format!("{} unmuted and deafened themselves", &user.name())), (None, None) => None, }; - // send notification if a user muted/unmuted - //TODO our channel only - /*let notif_desc = if let Some(deaf) = deaf { - if deaf { - Some(format!("{} muted and deafend themselves", &user.name())) - } else { - Some(format!("{} unmuted and undeafend themselves", &user.name())) - } - } else if let Some(mute) = mute { - if mute { - Some(format!("{} muted themselves", &user.name())) - } else { - Some(format!("{} unmuted themselves", &user.name())) - } - } else { - None - };*/ if let Some(notify_desc) = notify_desc { notify::send(notify_desc); } -- cgit v1.2.1