X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=data%2Frbot%2Fplugins%2Fdelicious.rb;h=53da34b41da15917003de9d2baa84d1879747dac;hb=052217de30c59206d7025b582d4604557a747470;hp=61ba0091a0e33df87d6cd14693c826e880a308c7;hpb=6f5528a63b44e610a3d25d7fe583399163d7d2da;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/delicious.rb b/data/rbot/plugins/delicious.rb index 61ba0091..53da34b4 100644 --- a/data/rbot/plugins/delicious.rb +++ b/data/rbot/plugins/delicious.rb @@ -62,6 +62,10 @@ class DeliciousPlugin < Plugin def event_url_added(url, options = {}) debug("called with #{url}, #{options.inspect}") + if @bot.config['delicious.user'].empty? + debug "del.icio.us plugin not configured, skipping" + return + end opts = Hash.new opts[:description] = options[:title] || options[:info] || url opts[:extended] = options[:extra] if options[:extra] @@ -74,10 +78,10 @@ class DeliciousPlugin < Plugin tags.tr(',', ' ').split(/\s+/).each do |t| if t.sub!(/^!/, '') case t - when 'nolog', 'no-log', 'dont-log', 'dontlog', 'skip': + when 'nolog', 'no-log', 'dont-log', 'dontlog', 'skip' debug "skipping #{url} on user request" return - when 'private', 'unshared', 'not-shared', 'notshared', 'hide': + when 'private', 'unshared', 'not-shared', 'notshared', 'hide' debug "hiding #{url} on user request" opts[:shared] = 'no' end