Added calculate module. Requires calc.

This commit is contained in:
Storm Dragon 2020-08-14 17:04:19 -04:00
parent 9cdb9b4f6e
commit 683330d7d1

11
modules/calculate/calculate.sh Executable file
View File

@ -0,0 +1,11 @@
[ -f functions.sh ] && source functions.sh
calculate() {
calc -- "$*" | tr -d '[:space:]'
}
name="$1"
shift
chan="$1"
shift
msg "$chan" "$name: $(calculate "$*")"