]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/delicious.rb
script plugin: use m.okay
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / delicious.rb
index df42e765f34bdf1715026437a171dd7627b9962b..61ba0091a0e33df87d6cd14693c826e880a308c7 100644 (file)
@@ -18,13 +18,13 @@ class DeliciousPlugin < Plugin
 
   attr_accessor :last_error
 
-  BotConfig.register BotConfigStringValue.new('delicious.user',
+  Config.register Config::StringValue.new('delicious.user',
     :default => '', :desc => "Username on del.icio.us")
-  BotConfig.register BotConfigStringValue.new('delicious.password',
+  Config.register Config::StringValue.new('delicious.password',
     :default => '', :desc => "Password on del.icio.us")
-  BotConfig.register BotConfigStringValue.new('delicious.user_fmt',
+  Config.register Config::StringValue.new('delicious.user_fmt',
     :default => 'user:%s', :desc => "How to convert users to tags?")
-  BotConfig.register BotConfigStringValue.new('delicious.channel_fmt',
+  Config.register Config::StringValue.new('delicious.channel_fmt',
     :default => 'channel:%s', :desc => "How to convert channels to tags?")
 
   def help(plugin, topic="")
@@ -46,7 +46,7 @@ class DeliciousPlugin < Plugin
   end
 
   def diu_add(url, opts = {})
-    old = diu_req('get', :url => url).root.get_elements('/posts/post')[0] rescue ni
+    old = diu_req('get', :url => url).root.get_elements('/posts/post')[0] rescue nil
     opts[:tags] ||= ''
     if old
       opts[:description] ||= old.attribute('description').to_s