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:
Storm Dragon
2016-09-07 10:06:14 -04:00
parent 8314bc2411
commit 1a3a715670
2 changed files with 16 additions and 4 deletions

12
modules/convert/convert.sh Executable file
View 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