# the restore to work.\r
#\r
# This is actually pretty safe for a number of reasons:\r
- # * the code is only called if standard marshalling fails\r
- # * the string we look for is quite unlikely to appear randomly\r
- # * if the string appears somewhere and the patched string isn't recoverable\r
- # either, we'll get another (unrecoverable) error, which makes the rss\r
- # plugin unsable, just like it was if no recovery was attempted\r
- # * if the string appears somewhere and the patched string is recoverable,\r
- # we may get a b0rked feed, which is eventually overwritten by a clean\r
- # one, so the worst thing that can happen is that a feed update spams\r
- # the watchers once\r
+ # * the code is only called if standard marshalling fails\r
+ # * the string we look for is quite unlikely to appear randomly\r
+ # * if the string appears somewhere and the patched string isn't recoverable\r
+ # either, we'll get another (unrecoverable) error, which makes the rss\r
+ # plugin unsable, just like it was if no recovery was attempted\r
+ # * if the string appears somewhere and the patched string is recoverable,\r
+ # we may get a b0rked feed, which is eventually overwritten by a clean\r
+ # one, so the worst thing that can happen is that a feed update spams\r
+ # the watchers once\r
@registry.recovery = Proc.new { |val|\r
patched = val.sub(":\v@mutexo:\nMutex", ":\v@mutexo:\vObject")\r
ret = Marshal.restore(patched)\r
end\r
end\r
\r
- title = "#{Bold}#{item.title.ircify_html :limit => @bot.config['rss.head_max']}#{Bold}" if item.title\r
+ tit_opt = {}\r
+ # Twitters don't need a cap on the title length since they have a hard\r
+ # limit to 160 characters, and most of them are under 140 characters\r
+ tit_opt[:limit] = @bot.config['rss.head_max'] unless feed.type == 'twitter'\r
\r
- desc = item.description.ircify_html(:limit => @bot.config['rss.text_max'], :a_href => :link_out) if item.description\r
+ title = "#{Bold}#{item.title.ircify_html(tit_opt)}#{Bold}" if item.title\r
+\r
+ desc_opt = {\r
+ :limit => @bot.config['rss.text_max'],\r
+ :a_href => :link_out\r
+ }\r
+ desc = item.description.ircify_html(desc_opt) if item.description\r
\r
link = item.link.chomp if item.link\r
\r