trans

Unnamed repository; edit this file 'description' to name the repository.
git clone git://fqcor.com/trans.git
torsocks git clone git://fqcoretoclxwqpy3dwktkskmwywrcktgnpviesveq6vrjhqhdc6y4fid.onion/trans.git
Log | Files | Refs | README | LICENSE

commit c9eed0754f03733b759c655d946a8adf65c07fb0
parent 26ea1fa94182a0dfc0c7752e5c9750d563cb2b83
Author: hhvn <dev@hhvn.uk>
Date:   Tue,  8 Jun 2021 21:16:36 +0100

botreply: rewrite "$1", replacing "^" with previous message

Signed-off-by: mys <>

Diffstat:
Mbotreply | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/botreply b/botreply @@ -68,6 +68,13 @@ _morse(){ } } +# rewrite ^ to previous message +rewrite="$(echo "$1" | \ + awk -v "previous=$(echo "$previous" | sed 's/:.*://')" \ + '{sub(/\^$/, previous, $0); print}')" + +[[ "$rewrite" =~ "." ]] && set -- "$rewrite" + case "$1" in # Reply to ping *"PING "*)