diff --git a/modules/sing/sing.sh b/modules/sing/sing.sh deleted file mode 100755 index a4c6984..0000000 --- a/modules/sing/sing.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -[ -f functions.sh ] && source functions.sh - -# Dependencies required by this module -dependencies=("clyrics") - -shift -chan="$1" -shift - -# Check dependencies before running -if ! check_dependencies "${dependencies[@]}"; then - msg "$chan" "$1: This module requires: ${dependencies[*]}" - exit 1 -fi -# Get the lyric text into a variable (quote $@ to prevent command injection) -lyricText="$(clyrics "$@" | tr '[:space:]' ' ' | tr -s ' ' | fold -s -w 384)" -i=$(echo "$lyricText" | wc -l) -i=$((RANDOM % i + 1)) -lyricText="$(echo "$lyricText" | tail +$i | head -1 | rev | cut -d '.' -f2- | rev)" -#Display the lyric text -if [ ${#lyricText} -gt 15 ] ; then -msg "$chan" "${lyricText}" -exit 0 -fi -msg "$chan" "no lyrics found for $*." -exit 0