summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/rss.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb
index 5e7eff21..22aa742f 100644
--- a/data/rbot/plugins/rss.rb
+++ b/data/rbot/plugins/rss.rb
@@ -815,9 +815,18 @@ class RSSFeedsPlugin < Plugin
end
end
- title = "#{Bold}#{item.title.ircify_html :limit => @bot.config['rss.head_max']}#{Bold}" if item.title
+ tit_opt = {}
+ # Twitters don't need a cap on the title length since they have a hard
+ # limit to 160 characters, and most of them are under 140 characters
+ tit_opt[:limit] = @bot.config['rss.head_max'] unless feed.type == 'twitter'
- desc = item.description.ircify_html(:limit => @bot.config['rss.text_max'], :a_href => :link_out) if item.description
+ title = "#{Bold}#{item.title.ircify_html(tit_opt)}#{Bold}" if item.title
+
+ desc_opt = {
+ :limit => @bot.config['rss.text_max'],
+ :a_href => :link_out
+ }
+ desc = item.description.ircify_html(desc_opt) if item.description
link = item.link.chomp if item.link