marvvin

IRC bot
Log | Files | Refs | README | LICENSE

commit dd35e39ef5d4a14a62e5e9b405af4ac690a2a675
parent 27021dd302f8db2a1207bf92c9e03751f5f9120d
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Fri,  9 Apr 2021 19:21:59 +0100

bin/: remove old scripts

Diffstat:
Dbin/change | 24------------------------
Dbin/forcesend | 3---
Dbin/slap | 17-----------------
Dbin/sudo | 8--------
Dbin/writefilters | 17-----------------
5 files changed, 0 insertions(+), 69 deletions(-)

diff --git a/bin/change b/bin/change @@ -1,24 +0,0 @@ -#!/bin/bash - -[ -z $1 ] && echo "change [type] [grep syntax'd search] TO [new name] -types=schedule" -ctype="$1" -shift -grepper=$(echo "$@" | grep -o '^.*TO' | sed 's/ TO$//') -replace=$(echo "$@" | grep -o 'TO.*$' | sed 's/^TO //') -case "$ctype" in - schedule*) echo "$NAME" | grep -E -- "^aldcor$|^haydenh$|^n0a110w$" || { - echo "No authorization" - exit 1 - } - for f in $(find schedule/$(echo "$CHANNEL" | tr '/' '%' | tr '[:upper:]' '[:lower:]')/ -type f) - do - grep "$grepper" < $f >/dev/null && { - echo "$(head -n 1 < $f)" > $f - echo "$replace" >> $f && echo "Successfully replaced" - exit 0 - } - done - ;; - *) commands/insult ;; -esac diff --git a/bin/forcesend b/bin/forcesend @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "$NAME" | grep -E -- '^haydenh$' >/dev/null && send "$*" diff --git a/bin/slap b/bin/slap @@ -1,17 +0,0 @@ -#!/bin/bash - -[ -z $1 ] && echo "slap me -slap [nick]" && exit 1 - -case "$1" in - me) name="$NAME" ;; - *) name="$1" ;; -esac - -replies=( - "*$BOTNICK slaps $name really hard* *$name doesn't really like it too much*" - "*$BOTNICK slaps $name REALLY REALLY hard* *$name screams quite loudly*" - "*$BOTNICK slaps $name weakly* *$name looks at $BOTNICK in confusion*" - "*$BOTNICK slaps $name* *$name slaps $BOTNICK back* *$BOTNICK experiences a TBI*" -) -echo ${replies[$((RANDOM % ${#replies[@]}))]} diff --git a/bin/sudo b/bin/sudo @@ -1,8 +0,0 @@ -#!/bin/bash - -[ -z $1 ] && echo "usage: sudo <command>" && exit - -touch /tmp/sudo -args=$(echo "$@" | awk '{$1="";print $0}' | sed 's~^[[:space:]]*~~') -commands/$1 $args -rm /tmp/sudo diff --git a/bin/writefilters b/bin/writefilters @@ -1,17 +0,0 @@ -#!/bin/bash - -for f in "" "But " "but " "Alright " "alright " "Good " "good " "Well, " "Well " "well, " "well " -do - for g in "Hi" "hi" "Hello" "hello" "Greetings" "greetings" "Hey" "hey" "Heyo" "heyo" "Hiya" "hiya" "Morning" "morning" "Evening" "evening" "Good morning" "good morning" "Good evening" "good evening" - do - echo "filter '^${f}$g .*' greet_responder" - done -done > filters/99-greet - -# for s in "/" "#" "," "~" "@" "-" "%" "^" "!" ";" ":" "+" "=" "_" -# do -# echo "filter '^[0-9]*s$s.*$s.*$s' say_sed -# filter '^[0-9]*s$s.*$s.*${s}g' say_sed -# filter '^g[0-9]*s$s.*$s.*$s' say_gsed -# filter '^g[0-9]*s$s.*$s.*${s}g' say_gsed" -# done > filters/99-sed