added rps module, fixed minor bugs, removed the redundant test.sh

This commit is contained in:
Dimitar Dimitrov
2013-07-18 17:40:25 +01:00
parent 2b8141c224
commit 19181cdfa9
5 changed files with 35 additions and 4 deletions

3
bot.sh
View File

@@ -26,14 +26,13 @@ do
then
continue
fi
echo "PRIVMSG #$channel :Welcome $who, have some op :)" >> $config
echo "MODE #$channel +o $who" >> $config
;;
# run when a message is seen
*PRIVMSG*)
echo "$res"
who=$(echo "$res" | sed -r "s/:(.*)\!.*@.*/\1/")
from=$(echo "$res" | sed -r "s/.*PRIVMSG ([#]?[a-zA-Z]*) :.*/\1/")
from=$(echo "$res" | sed -r "s/.*PRIVMSG ([#]?([a-zA-Z]|\-)*) :.*/\1/")
# "#" would mean it's a channel
if [ "$(echo "$from" | grep '#')" ]
then