changed module store style, removed the pow

This commit is contained in:
Dimitar Dimitrov
2013-07-22 18:37:13 +01:00
parent 6075bf719a
commit 7f97e1ac9e
10 changed files with 5 additions and 14 deletions

43
modules/azhu/azhu.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/bash
day=$(date +%a)
hour=$(date +%T | sed "s/\([^:]*\):.*/\1/" )
minute=$(date +%M)
percent=0
case $day in
"Mon" )
percent=$(($percent+25));;
"Tue" )
percent=$(($percent+20));;
"Wed" )
percent=$(($percent+20));;
"Thu" )
percent=$(($percent+25));;
"Fri" )
percent=$(($percent+30));;
"Sat" )
percent=$(($percent+100));;
"Sun" )
percent=$(($percent+100));;
esac
hp=$((10#$hour*10#$hour*10#$hour/150))
percent=$(($percent+$hp+$minute/20))
if [[ "$percent" -ge 100 ]]; then
percent=99
fi
if [ $# -ge 1 ]; then
if [ $1 == "azhu" ]; then
percent=0;
fi
echo "PRIVMSG $2 :$1: There is a $percent% chance azhu is sleeping right now."
else
echo "There is a $percent% chance azhu is sleeping right now."
fi