Introduction
Introduction Statistics Contact Development Disclaimer Help
Simplify radio status command. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 5653768e47a7001b2078713bdac855661fa867c3
parent 43bdce28a312a0b91dae499d47a1b828a599deaf
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 12 Jan 2025 17:14:20 +0100
Simplify radio status command.
Diffstat:
M annna-message-radio | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/annna-message-radio b/annna-message-radio
@@ -49,11 +49,8 @@ case "${text}" in
exit;;
"${ircuser}, please radio status.")
mpc_status="$(/usr/bin/mpc status | grep '\[.*\]' -o | tr -d '[]')"
- if [ -z "$mpc_status" ];
- then
- mpc_status="gone"
- fi
- annna-say -s "${server}" -c "${channel}" "The radio is $mpc_status."
+ [ -z "$mpc_status" ] && mpc_status="gone"
+ annna-say -s "${server}" -c "${channel}" "The radio is ${mpc_status}."
exit;;
esac
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.