Merge branch 'master' of https://github.com/Newbrict/bash-irc-bot
This commit is contained in:
commit
4f5bb91244
4
bot.sh
4
bot.sh
@ -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"
|
||||
|
@ -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
3
modules/help/help.sh
Executable file
@ -0,0 +1,3 @@
|
||||
echo "PRIVMSG $2 :$1: The available modules I have are:"
|
||||
output=$(ls modules/)
|
||||
echo "PRIVMSG $2 :$1: "$output
|
Loading…
Reference in New Issue
Block a user