Fixed some errors in the sing module.
This commit is contained in:
parent
3e9f936c64
commit
af4739ddd8
35
modules/hns/hns.sh
Executable file
35
modules/hns/hns.sh
Executable file
@ -0,0 +1,35 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
cpu="$(shuf -n 1 -e HACKER NUKE SHOTGUN)"
|
||||
player="$3"
|
||||
|
||||
case "${player^^}" in
|
||||
H|HA|HAC|HACK|HACKE|HACKER)
|
||||
player="HACKER"
|
||||
;;
|
||||
N|NU|NUKE)
|
||||
player="NUKE"
|
||||
;;
|
||||
S|SH|SHO|SHOT|SHOTG|SHOTGU|SHOTGUN)
|
||||
player="SHOTGUN"
|
||||
;;
|
||||
*)
|
||||
player="INVALID"
|
||||
esac
|
||||
|
||||
if [[ "$player" = "INVALID" ]]; then
|
||||
msg "$2" "$1: Please select HACKER, NUKE, or SHOTGUN."
|
||||
elif [[ "$cpu" = "$player" ]]; then
|
||||
msg "$2" "$1: You and I both selected $player, so we achieved mutual annihilation!"
|
||||
elif [[ "$cpu" = "HACKER" && "$player" != "SHOTGUN" ]]; then
|
||||
msg "$2" "$1: my $cpu disarmed your $player! I win!"
|
||||
elif [[ "$cpu" = "NUKE" && "$player" != "HACKER" ]]; then
|
||||
msg "$2" "$1: Never bring a $player to a fight with ${cpu}s! I blew your ass up! I win!"
|
||||
elif [[ "$cpu" = "SHOTGUN" && "$player" != "NUKE" ]]; then
|
||||
msg "$2" "$1: my $cpu splattered your ${player}'s head all over the wall! Eww gross, look at the brain goo... I win!"
|
||||
elif [[ "$player" = "HACKER" && "$cpu" != "SHOTGUN" ]]; then
|
||||
msg "$2" "$1: your $player disarmed my $cpu! You win!"
|
||||
elif [[ "$player" = "NUKE" && "$cpu" != "HACKER" ]]; then
|
||||
msg "$2" "$1: Never bring a $cpu to a fight with ${player}s! You blew my ass up! You win!"
|
||||
else
|
||||
msg "$2" "$1: your $player splattered my ${player}'s head all over the wall! Eww gross, look at the brain goo... You win!"
|
||||
fi
|
@ -32,7 +32,7 @@ lyricText="$(echo "$lyricText" | tr "[:space:]" " " | tr -s "[:space:]")"
|
||||
#sometimes lyrics are just one long line with everything. If this happens, cut it down so it's not too long for the 512 character channel limit.
|
||||
if [ ${#lyricText} -gt 412 ] ; then
|
||||
lyricText="${lyricText:0:409}... "
|
||||
lyricText="$(echo "$lyricText" | rev | cut -d " " -f 1- | rev)"
|
||||
lyricText="$(echo "$lyricText" | rev | cut -d " " -f 1- | rev | sed -e 's/try { _.*//g')"
|
||||
fi
|
||||
#Display the lyric text
|
||||
if [ ${#lyricText} -gt 15 ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user