From 95968ce9b07a35cf0c196491c4e050150e556bea Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 27 Mar 2008 00:06:12 +0100 Subject: [PATCH] weather plugin: advisories can be disabled --- data/rbot/plugins/weather.rb | 5 +++++ 1 file changed, 5 insertions(+) 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] -- 2.39.2