This commit is contained in:
DiSharko 2013-07-23 12:22:57 -04:00
commit 4f5bb91244
8 changed files with 5 additions and 5 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