summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2014-02-21 00:22:11 +0100
committerMatthias H <apoc@sixserv.org>2014-02-21 00:22:11 +0100
commit53f88ede296c89895c2e0dcd4db729be8cfa2f05 (patch)
tree123e2a7ac8dbef07c78df357a7855ea6b69809e1 /data/rbot
parent2e73cfeec6c9f549f216009570a29b12b927a99e (diff)
[plugin] threat removed, broken
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/threat.rb58
1 files changed, 0 insertions, 58 deletions
diff --git a/data/rbot/plugins/threat.rb b/data/rbot/plugins/threat.rb
deleted file mode 100644
index dacd1058..00000000
--- a/data/rbot/plugins/threat.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# Security threat level plugin for rbot
-# by Robin Kearney (robin@riviera.org.uk)
-#
-# inspired by elliots fascination with the us
-# threat level.
-#
-# again a dirty hack but it works, just...
-#
-
-require 'uri/common'
-
-class ThreatPlugin < Plugin
-
- def help(plugin, topic="")
- "threat => prints out the current threat level as reported by http://www.dhs.gov/"
- end
-
- def privmsg(m)
- color = ""
- red = "\x0304" # severe
- orange = "\x0307" # high
- yellow = "\x0308" # elevated
- blue = "\x0312" # guarded
- green = "\x0303" # low
- black = "\x0301" # default
-
- page = @bot.httputil.get("http://www.dhs.gov/index.shtm")
-
- if page =~ /\"Current National Threat Level is (.*?)\"/
- state = $1
- case state
- when "severe"
- color = red
- when "high"
- color = orange
- when "elevated"
- color = yellow
- when "guarded"
- color = blue
- when "low"
- color = green
- else
- color = black
- end
-
- m.reply color + "Today " + m.sourcenick + " the threat level is " + state.capitalize
- else
- m.reply "I was unable to retrieve the threat level"
- end
-
- return
- end
-
-end
-plugin = ThreatPlugin.new
-plugin.register("threat")
-
-