Fixed more translation problems.

This commit is contained in:
Storm Dragon 2020-08-19 20:42:23 -04:00
parent 1041c973a4
commit 57c135c3c5
2 changed files with 29 additions and 28 deletions

1
bot.sh
View File

@ -137,6 +137,7 @@ tail -f "$input" | telnet "$server" "$port" | while read -r result ; do
./triggers/link/link.sh "$who" "$from" "$result"
set -f
# Although this calls modules, it triggers on text other than the bot's nick
# To make sure that modules are only called when they are supposed to be, had to combine string monipulation with regexp.
elif [[ "${result#:*:}" =~ ^[${botCaller}][a-zA-Z_].* ]]; then
command="${result#*:[[:punct:]]}"
command="${command//# /}"

View File

@ -7,39 +7,39 @@ shift
redneck() {
echo -n "$*" | sed \
-r -e "s/ass/ice/gI" \
-e "s/(^| )finger( |,|\?|\.|!)/\1fanger\2/gI" \
-e "s/(^| )thing( |,|\?|\.|!)/\1thang\2/gI" \
-e "s/(^| )finger( |,|\?|\.|!|$)/\1fanger\2/gI" \
-e "s/(^| )thing( |,|\?|\.|!|$)/\1thang\2/gI" \
-e "s/(.\w+)ink(.*)/\1ank\2/gI" \
-e "s/(^| )A /\1Uh /gI" \
-e "s/(^| )A /\1uh /gI" \
-e "s/(.*)i([^a|^e|^u|^ble|^ck|^ll|^ndo|^on|^s].*)/\1ah\2/gI" \
-e "s/(^| )(boy|dude|fellow|guy|man)([?s])( |,|\?|\.|!)/\1feller\3\4/gI" \
-e "s/(^| )for( |,|\?|\.|!)/\1fer\2/gI" \
-e "s/(^| )(hello|hey|hi|how's it going|hows it going)( |,|\?|\.|!)/\1howdy\3/gI" \
-e "s/(^| )men( |,|\?|\.|!)/\1fellers\2/gI" \
-e "s/(^| )get( |,|\?|\.|!)/\1git\2/gI" \
-e "s/(^| )(appartment|cottage|house)( |,|\?|\.|!)/\1shack\3/gI" \
-e "s/(^| )(god damn|goddam)( |,|\?|\.|!)/\1gol-durn\3/gI" \
-e "s/(^| )damn( |,|\?|\.|!)/\1durn\2/gI" \
-e "s/(^| )(am not|is not|isn't|are not|aren't|will not)( |,|\?|\.|!)/\1ain't\3/gI" \
-e "s/(^| )bear( |,|\?|\.|!)/\1bar\2/gI" \
-e "s/(^| )(cannot|can't)( |,|\?|\.|!)/\1cain't\3/gI" \
-e "s/(^| )careful( |,|\?|\.|!)/\1kerful\2/gI" \
-e "s/(^| )terrible( |,|\?|\.|!)/\1ter'ble\2/gI" \
-e "s/(\w)ing( |,|\?|\.|!)/\1in'\2/gI" \
-e "s/(\w)(i|ah)ght( |,|\?|\.|!)/\1aht'\3/gI" \
-e "s/(^| )(boy|dude|fellow|guy|man)([?s])( |,|\?|\.|!|$)/\1feller\3\4/gI" \
-e "s/(^| )for( |,|\?|\.|!|$)/\1fer\2/gI" \
-e "s/(^| )(hello|hey|hi|how's it going|hows it going)( |,|\?|\.|!|$)/\1howdy\3/gI" \
-e "s/(^| )men( |,|\?|\.|!|$)/\1fellers\2/gI" \
-e "s/(^| )get( |,|\?|\.|!|$)/\1git\2/gI" \
-e "s/(^| )(appartment|cottage|house)( |,|\?|\.|!|$)/\1shack\3/gI" \
-e "s/(^| )(god damn|goddam)( |,|\?|\.|!|$)/\1gol-durn\3/gI" \
-e "s/(^| )damn( |,|\?|\.|!|$)/\1durn\2/gI" \
-e "s/(^| )(am not|is not|isn't|are not|aren't|will not)( |,|\?|\.|!|$)/\1ain't\3/gI" \
-e "s/(^| )bear( |,|\?|\.|!|$)/\1bar\2/gI" \
-e "s/(^| )(cannot|can't)( |,|\?|\.|!|$)/\1cain't\3/gI" \
-e "s/(^| )careful( |,|\?|\.|!|$)/\1kerful\2/gI" \
-e "s/(^| )terrible( |,|\?|\.|!|$)/\1ter'ble\2/gI" \
-e "s/(\w)ing( |,|\?|\.|!|$)/\1in'\2/gI" \
-e "s/(\w)(i|ah)ght( |,|\?|\.|!|$)/\1aht'\3/gI" \
-e "s/(^| )my /\1mah /gI" \
-e "s/(^| )people( |,|\?|\.|!)/\1folks\2/gI" \
-e "s/(^| )pretty( |,|\?|\.|!)/\1purdy\2/gI" \
-e "s/(^| )sure( |,|\?|\.|!)/\1shore\2/gI" \
-e "s/(^| )there( |,|\?|\.|!)/\1thar'\2/gI" \
-e "s/(^| )people( |,|\?|\.|!|$)/\1folks\2/gI" \
-e "s/(^| )pretty( |,|\?|\.|!|$)/\1purdy\2/gI" \
-e "s/(^| )sure( |,|\?|\.|!|$)/\1shore\2/gI" \
-e "s/(^| )there( |,|\?|\.|!|$)/\1thar'\2/gI" \
-e "s/(.*)window(.*)/\1windder\2/gI" \
-e "s/(.*)where|we're(.*)/\1wer\2/gI" \
-e "s/(^| )that( |,|\?|\.|!)/\1'at thar'\2/gI" \
-e "s/(^| )this( |,|\?|\.|!)/\1'is here\2/gI" \
-e "s/(^| )wash( |,|\?|\.|!)/\1wahrsh\2/gI" \
-e "s/(^| )([bg])ah([g|t])( |,|\?|\.|!|')/\1\2i\3\4/gI" \
-e "s/(^| )aht( |,|\?|\.|!|')/\1it\2/gI" \
-e "s/(^| )(ahf|if)( |,|\?|\.|!)/\1iffen\3/gI" \
-e "s/(^| )that( |,|\?|\.|!|$)/\1'at thar'\2/gI" \
-e "s/(^| )this( |,|\?|\.|!|$)/\1'is here\2/gI" \
-e "s/(^| )wash( |,|\?|\.|!|$)/\1wahrsh\2/gI" \
-e "s/(^| )([bg])ah([g|t])( |,|\?|\.|!|'|$)/\1\2i\3\4/gI" \
-e "s/(^| )aht( |,|\?|\.|!|'|$)/\1it\2/gI" \
-e "s/(^| )(ahf|if)( |,|\?|\.|!|$)/\1iffen\3/gI" \
-e "s/^[Yy]ou( |,|\.|\?\!|$)/Y'all\1/g"
echo " $(shuf -n1 -e \