Sing will now accept tracks with a :, bot config file is now bot.cfg.
This commit is contained in:
parent
ee4ea5e271
commit
8e733593f0
7
bot.sh
7
bot.sh
@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[ -f functions.sh ] && source functions.sh
|
[ -f functions.sh ] && source functions.sh
|
||||||
[ -f bot.properties ] && source bot.properties
|
[ -f bot.cfg ] && source bot.cfg
|
||||||
input=".botinput"
|
input=".botinput"
|
||||||
|
|
||||||
close_bot()
|
close_bot()
|
||||||
{
|
{
|
||||||
echo -en "QUIT :$quitMessage\r\n" >> "$input"
|
echo -en ":QUIT :$quitMessage\r\n" >> "$input"
|
||||||
rm "$input"
|
rm "$input"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
@ -76,7 +76,6 @@ do
|
|||||||
will="${com#* }"
|
will="${com#* }"
|
||||||
com="${com%% *}"
|
com="${com%% *}"
|
||||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||||
./modules/help/help.sh "$who" "$from"
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
||||||
@ -92,7 +91,7 @@ do
|
|||||||
will=$(echo "$will" | perl -pe "s/^ +//")
|
will=$(echo "$will" | perl -pe "s/^ +//")
|
||||||
com=$(echo "$will" | cut -d " " -f1)
|
com=$(echo "$will" | cut -d " " -f1)
|
||||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||||
./modules/help/help.sh $who $from
|
./modules/help/help.sh "$who" "$from"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99)
|
./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99)
|
||||||
|
@ -5,7 +5,7 @@ shift
|
|||||||
chan="$1"
|
chan="$1"
|
||||||
shift
|
shift
|
||||||
#get the lyric text into a variable
|
#get the lyric text into a variable
|
||||||
trackName="$@"
|
trackName="${@//:/ - }"
|
||||||
curl="$(command -v curl)"
|
curl="$(command -v curl)"
|
||||||
trackName="$(echo "$trackName" | sed -e "s/ /_/g" -e 's/([[:print:]]*)//g' -e "s/['\/\.]//g" -e 's/&/and/g' -e 's/ö/o/g')"
|
trackName="$(echo "$trackName" | sed -e "s/ /_/g" -e 's/([[:print:]]*)//g' -e "s/['\/\.]//g" -e 's/&/and/g' -e 's/ö/o/g')"
|
||||||
artist="$(echo "${trackName,,}" | cut -d "-" -f 1 | sed -e 's/_$//' -e 's/^the_\(.*\)/\1_the/')"
|
artist="$(echo "${trackName,,}" | cut -d "-" -f 1 | sed -e 's/_$//' -e 's/^the_\(.*\)/\1_the/')"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user