commit 64491da08a047caaa1dfe0d64dbd13980b18fa54 parent 23b174f78e81269dd6148a9f7e77e335d6e46194 Author: hhvn <dev@hhvn.uk> Date: Tue, 6 Apr 2021 20:15:35 +0200 botreply: fix help Signed-off-by: mys <> Diffstat:
M | botreply | | | 11 | ++++++----- |
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/botreply b/botreply @@ -67,11 +67,12 @@ case "$1" in echo "$1" | awk -v "name=$name" -v "rot=$rot" '{print "PRIVMSG "$3" :"name": "rot}' ;; *"PRIVMSG "*":$nick: help"|*"PRIVMSG "*":$nick, help") - echo "$nick: [<input-lang>:<output-lang>] <untranslated-text>" - echo "$nick: :morse <encoded-text|unencoded-text>" - echo "$nick: :phoneme <english text>" - echo "$nick: :ipa <english text>" - echo "$nick: :rot<n> <text>" + channel=$(echo "$1" | awk '{print $3}') + echo "PRIVMSG $channel :$nick: [<input-lang>:<output-lang>] <untranslated-text>" + echo "PRIVMSG $channel :$nick: :morse <encoded-text|unencoded-text>" + echo "PRIVMSG $channel :$nick: :phoneme <english text>" + echo "PRIVMSG $channel :$nick: :ipa <english text>" + echo "PRIVMSG $channel :$nick: :rot<n> <text>" ;; *"PRIVMSG "*":$nick:"*|*"PRIVMSG "*":$nick,"*) direction=$(echo "$1" | sed "/.*:$nick[,:] \([a-z]*\)-*[:>]\([a-z]*\) .*/!d;s//\1:\2/")