fixed small bug updated readme

This commit is contained in:
Dimitar Dimitrov 2013-07-23 15:33:40 +01:00
parent 3c3fbdc830
commit 4eda44a669
2 changed files with 4 additions and 8 deletions

View File

@ -3,11 +3,7 @@ bash-irc-bot
A simple, modular IRC bot written in bash A simple, modular IRC bot written in bash
any .sh script in modules/ will be executed with all arguments when called like so: throw "modules" into /modules/module-name/module-name.sh
and they will be loaded up during runtime.
botnickname: test optional call modules with botname: test arg1 arg2 ....
will run test.sh with the arguments
$1 = your nick
$2 = from where it came (room/channel)
$3-X the rest of the args

2
bot.sh
View File

@ -47,7 +47,7 @@ do
com=$(echo "$will" | cut -d " " -f1) com=$(echo "$will" | cut -d " " -f1)
if [ -z "$(ls modules/ | grep -i -- "$com")" ] if [ -z "$(ls modules/ | grep -i -- "$com")" ]
then then
./modules/help.sh $who $from >> $input ./modules/help/help.sh $who $from >> $input
continue continue
fi fi
./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99) >> $input ./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99) >> $input