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