@watchers.delete(who)\r
end\r
\r
- # def to_ary\r
- # [@handle,@url,@type,@watchers]\r
- # end\r
+ def to_a\r
+ [@handle,@url,@type,@watchers]\r
+ end\r
+\r
+ def to_s(watchers=false)\r
+ if watchers\r
+ a = self.to_a.flatten\r
+ else\r
+ a = self.to_a[0,3]\r
+ end\r
+ a.join(" | ")\r
+ end\r
end\r
\r
class RSSFeedsPlugin < Plugin\r
end\r
\r
def printFormattedRss(feed, item)\r
+ debug "Printing formatted item #{item.inspect} for feed #{feed.to_s}"\r
feed.watchers.each { |loc|\r
case feed.type\r
when 'blog'\r
when 'gmame'\r
@bot.say loc, "::#{feed.handle}:: Message #{item.title} sent by #{item.dc_creator}. #{item.description.split("\n")[0].chomp.riphtml.shorten(@bot.config['rss.text_max'])} ::"\r
when 'trac'\r
- @bot.say loc, "/---- #{feed.handle} :: #{item.title} :: #{item.link}"\r
- @bot.say loc, "|#{item.description.gsub(/\s+/,' ').strip.riphtml.shorten(@bot.config['rss.text_max'])}"\r
- @bot.say loc, "\\----"\r
+ @bot.say loc, "::#{feed.handle}:: #{item.title} :: #{item.link}"\r
+ @bot.say loc, "::#{feed.handle}:: #{item.description.gsub(/\s+/,' ').strip.riphtml.shorten(@bot.config['rss.text_max'])}"\r
else\r
printRssItem(loc,item)\r
end\r