summaryrefslogtreecommitdiff
path: root/shbrain.sh
diff options
context:
space:
mode:
authorjulien2009-08-18 08:28:39 +0200
committerjulien2009-08-18 08:28:39 +0200
commitec7e577dd75f6595a76a74f02c0a8b4cd9113d33 (patch)
tree30aec0c3b48f6eb1a151fb04db52c8d52bfaca8c /shbrain.sh
parentFixed the trains script by changing the parsing strategy; added some response... (diff)
downloadshbot-ec7e577dd75f6595a76a74f02c0a8b4cd9113d33.tar.gz
shbot-ec7e577dd75f6595a76a74f02c0a8b4cd9113d33.tar.bz2
shbot-ec7e577dd75f6595a76a74f02c0a8b4cd9113d33.zip
Refactored command handling
Diffstat (limited to 'shbrain.sh')
-rwxr-xr-xshbrain.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/shbrain.sh b/shbrain.sh
index 74fc135..6a42feb 100755
--- a/shbrain.sh
+++ b/shbrain.sh
@@ -12,7 +12,13 @@ do
EXPAND=(${LINE})
CMD=${EXPAND[4]#:}
ARGS=${EXPAND[*]:5}
- if [ "$CMD" = "trains" ]; then
+ if [ "$CMD" = "advert" ]; then
+ echo "PRIVMSG $ARGS :Listen to shbot, the one true Bot"'!' >&3
+ elif [ "$CMD" = "join" ]; then
+ echo "JOIN $ARGS" >&3
+ elif [ "$CMD" = "part" ]; then
+ echo "PART $ARGS" >&3
+ elif [ "$CMD" = "trains" ]; then
./shtrains.sh ${ARGS[*]}
elif [ "$CMD" = "help" ]; then
./shhelp.sh $ARGS