X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Frss.rb;h=ed37965036ff4abfadd6fe60fba50bb4ab32f671;hb=69db4133c5ccfa41c35b43c67fce1d5ff640bfd5;hp=e0d4df01747b4b6ccf77049133c62d9d22f20e0b;hpb=1107570cb696e4d9f870da00282233b60b8a00ca;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index e0d4df01..ed379650 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -230,11 +230,11 @@ end class RSSFeedsPlugin < Plugin BotConfig.register BotConfigIntegerValue.new('rss.head_max', - :default => 30, :validate => Proc.new{|v| v > 0 && v < 200}, + :default => 100, :validate => Proc.new{|v| v > 0 && v < 200}, :desc => "How many characters to use of a RSS item header") BotConfig.register BotConfigIntegerValue.new('rss.text_max', - :default => 90, :validate => Proc.new{|v| v > 0 && v < 400}, + :default => 200, :validate => Proc.new{|v| v > 0 && v < 400}, :desc => "How many characters to use of a RSS item text") BotConfig.register BotConfigIntegerValue.new('rss.thread_sleep', @@ -778,9 +778,9 @@ class RSSFeedsPlugin < Plugin end end - title = "#{Bold}#{item.title.ircify_html}#{Bold}" if item.title + title = "#{Bold}#{item.title.ircify_html :limit => @bot.config['rss.head_max']}#{Bold}" if item.title - desc = item.description.ircify_html(:a_href => :link_out) if item.description + desc = item.description.ircify_html(:limit => @bot.config['rss.text_max'], :a_href => :link_out) if item.description link = item.link.chomp if item.link @@ -945,6 +945,9 @@ plugin.map 'rss replace :handle :url :type', plugin.map 'rss forcereplace :handle :url :type', :action => 'forcereplace_rss', :defaults => {:type => nil} +plugin.map 'rss watch :handle [in :chan]', + :action => 'watch_rss', + :defaults => {:url => nil, :type => nil} plugin.map 'rss watch :handle :url :type [in :chan]', :action => 'watch_rss', :defaults => {:url => nil, :type => nil}