marvvin

IRC bot
Log | Files | Refs | README | LICENSE

commit e1fcb5188b7f62878d0d1c6cac92347ced022049
parent 3194f1e50dbce10eedf0fb01bbc38f856e1e36d5
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 15 May 2022 20:27:24 +0100

Only use units(1) when $VERB == convert

Diffstat:
Mhandler.rc | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/handler.rc b/handler.rc @@ -179,7 +179,8 @@ if (~ $PARAMS(1) 'PING') { if (!~ $ARGS(1) [0-9]*) { ARGS = (1 $ARGS) } - if (~ $ARGS to into as in) { + + if (~ $VERB convert && ~ $ARGS to into as in) { from = `$nl{echo $^ARGS | sed -E 's/(^| )(to|into|as|in)( |$).*//'} to = `$nl{echo $^ARGS | sed -E 's/.*(^| )(to|into|as|in)( |$)//'} data = `$nl{units $from $to >[2]/dev/null}