From cc89420731f873f6355ae921d416cf2edd7e7a8e Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 14 Aug 2020 17:33:08 -0400 Subject: [PATCH] Initial commit of the redneck translator. Not finished by any means, but a good start. --- modules/redneck/redneck.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 modules/redneck/redneck.sh diff --git a/modules/redneck/redneck.sh b/modules/redneck/redneck.sh new file mode 100755 index 0000000..b259f2b --- /dev/null +++ b/modules/redneck/redneck.sh @@ -0,0 +1,34 @@ +[ -f functions.sh ] && source functions.sh + +shift +chan="$1" +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/(^| )think( |,|\?|\.|!)/\1thank\2/gI" \ + -e "s/(^| )A /\1Uh /gI" \ + -e "s/(.*)i([^a|^e|^ll|^on|s].*)/\1ah\2/gI" \ + -e "s/(^| )(boy|dude|fellow|guy|man)( |,|\?|\.|!)/\1feller\3/gI" \ + -e "s/(^| )for( |,|\?|\.|!)/\1fer\2/gI" \ + -e "s/(^| )(appartment|cottage|house)( |,|\?|\.|!)/\1shack\3/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/(^| )that( |,|\?|\.|!)/\1'at thar'\2/gI" \ + -e "s/(^| )this( |,|\?|\.|!)/\1'is here\2/gI" \ + -e "s/^[Yy]ou( |,|\.|\?\!|$)/Y'all\1/g" + +echo " $(shuf -n1 -e \ + "Hold Mah beer." \ + "You're darn tootn" \ + "Y'all come back now, y'hear?" \ + "Yyyyyyeeeeeeeeehaaaaaaaaawwwwww!" \ +)" +} + +msg "$chan" "$(redneck "$*")"