From 9cdb9b4f6efd7c45899ba26d2252b54dfdf4182b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 14 Aug 2020 13:48:54 -0400 Subject: [PATCH] First attempt at replacing the now offline pimp translator. It's not as good as the original yet though. --- modules/pimp/pimp.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 modules/pimp/pimp.sh diff --git a/modules/pimp/pimp.sh b/modules/pimp/pimp.sh new file mode 100755 index 0000000..d46a1c8 --- /dev/null +++ b/modules/pimp/pimp.sh @@ -0,0 +1,32 @@ +[ -f functions.sh ] && source functions.sh + +shift +chan="$1" +shift + +pimp() { + echo -n "$*" | sed \ + -r -e "s/(^| )ask( |\?|\.|!)/\1aks\2/gI" \ + -e "s/(^| )A /\1Uh $(shuf -e -n1 "god damn" "motha fuckin'") /gI" \ + -e "s/(^| )I /\1Ah /gI" \ + -e "s/(^| )is /\1be /gI" \ + -e "s/(^| )are /\1is /gI" \ + -e "s/(^| )(boy|dude|friend|guy|man)( |\?|\.|!)/\1$(shuf -n1 -e "bruh" "bruh-man" "brutha")\3/gI" \ + -e "s/(^| )for( |\?|\.|!)/\1fuh\2/gI" \ + -e "s/(^| )(appartment|house)( |\?|\.|!)/\1crib\3/gI" \ + -e "s/(\w)ing( |\?|\.|!)/\1in'\2/gI" \ + -e "s/(^| )my /\1mah /gI" \ + -e "s/(^| )people /\1people /gI" \ + -e "s/(^| )that( |\?|\.|!)/\1dat\2/gI" \ + -e "s/(^| )this( |\?|\.|!)/\1dis\2/gI" + +echo " $(shuf -n1 -e \ + "Brace yourself foo'!" \ + "What 'chew thinking Gee!" \ + "and shit!" \ + "sho 'nuff! ya'eard!?" \ + "nd git Sheniquah's ass back ova' heeah!" \ +)" +} + +msg "$chan" "$(pimp "$*")"