]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
rss: more detailed forum type
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 11 Mar 2009 18:56:56 +0000 (19:56 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 11 Mar 2009 18:56:56 +0000 (19:56 +0100)
data/rbot/plugins/rss.rb

index 30d09bd3a3280b7f875e5efa33a84c62e52bb1bd..510db0094b06c79598afda92e16bc775f7965728 100644 (file)
@@ -366,8 +366,11 @@ class RSSFeedsPlugin < Plugin
       make_stream(line1, nil, s, :author => author)
     }
     @bot.register_filter(:forum, @outkey) { |s|
-      line1 = "%{handle}%{date}%{title}%{at}%{link}"
-      make_stream(line1, nil, s)
+      author = s[:author] ? (s[:author] + " ") : ""
+      abt = s[:category] ? "on #{s[:category]} " : ""
+      line1 = "%{handle}%{date}%{author}posted %{abt}at %{link}"
+      line2 = "%{handle}%{title} - %{desc}"
+      make_stream(line1, line2, s, :author => author, :abt => abt)
     }
     @bot.register_filter(:wiki, @outkey) { |s|
       line1 = "%{handle}%{date}%{title}%{at}%{link}"