]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/delicious.rb
quiz: stop quizzes and timers on cleanup
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / delicious.rb
index 61ba0091a0e33df87d6cd14693c826e880a308c7..53da34b41da15917003de9d2baa84d1879747dac 100644 (file)
@@ -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