Fixed a bug in parsing input with calling the bot by name, also, added convert module that requires the units program.
This commit is contained in:
12
modules/convert/convert.sh
Executable file
12
modules/convert/convert.sh
Executable file
@ -0,0 +1,12 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
units="$(command -v units)"
|
||||
|
||||
shift
|
||||
chan="$1"
|
||||
shift
|
||||
if [ -z "$units" ]; then
|
||||
msg "$chan" "I do not have access to units."
|
||||
else
|
||||
msg "$chan" "$($units -v $@ | head -n1)"
|
||||
fi
|
Reference in New Issue
Block a user