From 676b3fb7fddc8d35b3ae20c59f4a3ddd7b4039c5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 19 Oct 2006 21:52:10 +0000 Subject: Update threat plugin to new DHS site layout, and make it more robust --- data/rbot/plugins/threat.rb | 47 ++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/threat.rb b/data/rbot/plugins/threat.rb index ae709101..3784dafe 100644 --- a/data/rbot/plugins/threat.rb +++ b/data/rbot/plugins/threat.rb @@ -16,36 +16,39 @@ class ThreatPlugin < Plugin end def privmsg(m) - color = "" + color = "" red = "\x0304" # severe - orange = "\x0307" # high - yellow = "\x0308" # elevated - blue = "\x0312" # guarded - green = "\x0303" # low - black = "\x0301" # default - - page = @bot.httputil.get URI.parse("http://www.dhs.gov/dhspublic/") - if page =~ /