mirror of
https://github.com/nealey/irc-bot
synced 2025-01-13 10:24:35 -07:00
fix a run bug
This commit is contained in:
parent
12d1b626a8
commit
da716ad947
2 changed files with 18 additions and 2 deletions
|
@ -19,6 +19,21 @@ join () {
|
|||
raw "JOIN $1"
|
||||
}
|
||||
|
||||
cobalt () {
|
||||
case "$1" in
|
||||
air)
|
||||
w3m -dump -cols 9999 'http://environweb.lanl.gov/Teom/teom30s.asp?MasterSiteID=211&offset=0' 2> /dev/null | \
|
||||
awk '/.:..:.. .M/ {print "Los Alamos Air: " $5 "μg/m³ at " $2; exit}'
|
||||
;;
|
||||
nachos)
|
||||
echo "aieeeee"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
out=$(tempfile)
|
||||
|
||||
case $command in
|
||||
|
@ -33,6 +48,7 @@ case $command in
|
|||
PRIVMSG)
|
||||
case "$forum" in
|
||||
\#*)
|
||||
cobalt "$text" || \
|
||||
$ircdir/firebot "$text" || \
|
||||
$ircdir/whuffie $botdir/whuffie.cdb "$text" || \
|
||||
$ircdir/infobot $botdir/factoids.cdb "$text"
|
||||
|
|
4
run
4
run
|
@ -11,6 +11,6 @@ if [ ! -d "$botdir" ]; then
|
|||
fi
|
||||
|
||||
while true; do
|
||||
$botdir/connect $d/connect-handler $botdir
|
||||
$botdir/connect $ircdir/connect-handler $botdir
|
||||
sleep 5
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue