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

4
bot.sh
View File

@ -45,12 +45,12 @@ do
fi
will=$(echo "$will" | perl -pe "s/^ //")
com=$(echo "$will" | cut -d " " -f1)
if [ -z "$(ls modules/ | grep -i -- "$com.sh")" ]
if [ -z "$(ls modules/ | grep -i -- "$com")" ]
then
./modules/help.sh $who $from >> $input
continue
fi
./modules/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99) >> $input
./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99) >> $input
;;
*)
echo "$res"

View File

@ -1,3 +0,0 @@
echo "PRIVMSG $2 :$1: The available modules I have are:"
output=$(find modules/ -maxdepth 1 -type f -not -name ".*" -printf "%f\n" | sed "s/.sh//")
echo "PRIVMSG $2 :$1: "$output

3
modules/help/help.sh Executable file
View File

@ -0,0 +1,3 @@
echo "PRIVMSG $2 :$1: The available modules I have are:"
output=$(ls modules/)
echo "PRIVMSG $2 :$1: "$output

Binary file not shown.

View File

@ -1,9 +0,0 @@
#! /bin/sh
# Ted Meyer
# Incredibly stupid Math bot
#
sender=$1 # sender (the person I am talking to)
channel=$2 # channel
equ=$3 # math equ
res=$(java -cp math/ nums $equ)
echo "PRIVMSG $channel :$sender: $res"