added version number

This commit is contained in:
DiSharko 2013-07-23 13:01:18 -04:00
parent 424b3dd8c8
commit 00228ad0c0

View File

@ -1,7 +1,20 @@
#!/bin/bash
. "../../bot.properties"
log="../../$log"
versionString="azhu® version 2.0.1 by Andrew DiMarco"
if [ $# == 3 ]; then
if [ $3 == "--version" ]; then
echo $versionString
exit
fi
elif [ $# == 1 ]; then
if [ $1 == "--version" ]; then
echo $versionString
exit
fi
fi
. "bot.properties"
lines=$(grep "!azhu" $log)
name=$(echo $lines | sed "s/.*\]:\(.*\)![^!]*/\1/g")
@ -24,7 +37,6 @@ if [ "$daysApart" -eq 0 ]; then
minutesBetween=$(((10#$hour - 10#$lastResponse_hour)*60 + 10#$minute - 10#$lastResponse_minute))
fi
responsePercent=0
if [ $minutesBetween -ge 0 ]; then
responsePercent=$(( -5000/($minutesBetween+40) - $minutesBetween/25 + 100 ))