From da716ad9473c8608d4e6bb31b1958c9717f5cdf1 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 20 Sep 2011 10:39:41 -0500 Subject: [PATCH] fix a run bug --- cobalt/handler | 16 ++++++++++++++++ run | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cobalt/handler b/cobalt/handler index d1f975d..46a0a1b 100755 --- a/cobalt/handler +++ b/cobalt/handler @@ -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" diff --git a/run b/run index c4ad2f6..477a8f4 100755 --- a/run +++ b/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 \ No newline at end of file +done