diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-03-14 00:47:24 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-03-14 00:47:24 +0100 |
commit | 92b0ee34a4934592d0bb5f62a4cdfa57952b9ede (patch) | |
tree | 8fb89c4b4be3493b9c05ad3da3c6fcad2feba5b1 /data | |
parent | 9d91c30c771aacf2f679a7379af5be1ebba4daec (diff) |
rss plugin: command to show known rss types
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/rss.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 72a2be0a..3b790bac 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -356,6 +356,13 @@ class RSSFeedsPlugin < Plugin } end + # Display the known rss types + def rss_types(m, params) + ar = @bot.filter_names(@outkey) + ar.delete(:default) + m.reply ar.map { |k| k.to_s }.sort!.join(", ") + end + attr_reader :feeds def initialize @@ -477,8 +484,10 @@ class RSSFeedsPlugin < Plugin "rss who watches #{Bold}handle#{Bold}: lists watches for rss #{Bold}handle#{Bold}" when "rewatch" "rss rewatch : restart threads that watch for changes in watched rss" + when "types" + "rss types : show the rss types for which an output format existi (all other types will use the default one)" else - "manage RSS feeds: rss show|list|watched|add|change|del(ete)|rm|(force)replace|watch|unwatch|rmwatch|rewatch|who watches" + "manage RSS feeds: rss types|show|list|watched|add|change|del(ete)|rm|(force)replace|watch|unwatch|rmwatch|rewatch|who watches" end end @@ -1150,3 +1159,5 @@ plugin.map 'rss rmwatch :handle [in :chan]', :action => 'unwatch_rss' plugin.map 'rss rewatch [:handle]', :action => 'rewatch_rss' +plugin.map 'rss types', + :action => 'rss_types' |