Get external helper programs working

This commit is contained in:
Neale Pickett 2010-12-09 17:10:06 -07:00
parent d850b2cbbe
commit 089dd6b846
1 changed files with 28 additions and 0 deletions

28
helper Executable file
View File

@ -0,0 +1,28 @@
#! /bin/sh
sender=$1
forum=$2
read cmd args
case $cmd in
.hi)
echo "Hi, ASL"
;;
.date)
date
;;
.msgme)
echo ":PRIVMSG $sender :hey baby"
;;
.finger)
host="$(echo $args | cut -d@ -f 2)"
[ "$host" = "$args" ] && host=lanl.gov
echo $args | cut -d@ -f 1 | nc $host finger
;;
.calc)
echo $args | bc -l
;;
*)
echo "I'm sorry, $sender, I don't understand that command."
;;
esac