diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-03-27 00:06:12 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-03-27 00:06:12 +0100 |
commit | 95968ce9b07a35cf0c196491c4e050150e556bea (patch) | |
tree | eba448a7e8553704088bedec3d90825ddd246f95 /data | |
parent | c6b7a60b7cca32037372bedbf36587e4e250e430 (diff) |
weather plugin: advisories can be disabled
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/weather.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/rbot/plugins/weather.rb b/data/rbot/plugins/weather.rb index 4f89e08d..a3550fb9 100644 --- a/data/rbot/plugins/weather.rb +++ b/data/rbot/plugins/weather.rb @@ -67,6 +67,10 @@ private end class WeatherPlugin < Plugin + + Config.register Config::BooleanValue.new('weather.advisory', + :default => true, + :desc => "Should the bot report special weather advisories when any is present?") def help(plugin, topic="") case topic @@ -265,6 +269,7 @@ class WeatherPlugin < Plugin end def wu_out_special(m, xml) + return unless @bot.config['weather.advisory'] special = wu_check_special(xml).merge(:underline => Underline) if special if special[:text] |