aboutsummaryrefslogtreecommitdiffstats
path: root/mumd
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2020-11-12 22:56:57 +0100
committerEskil Queseth <eskilq@kth.se>2020-11-12 22:56:57 +0100
commit6e5edfc33b54a20ed04ef270aa39b1aa763faeea (patch)
tree401984a9de5d5b8469626abe80a02d3620f47678 /mumd
parent7d55907189a7e5210843efcb3e74f345d594a673 (diff)
downloadmum-6e5edfc33b54a20ed04ef270aa39b1aa763faeea.tar.gz
remove commented out code
Diffstat (limited to 'mumd')
-rw-r--r--mumd/src/state.rs21
1 files changed, 3 insertions, 18 deletions
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);
}