]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/unicode.rb
keywords plugin: when exporting to factoids, split at ' or '
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / unicode.rb
index a46b677984d4f92e1564d778c7d619ab3832ed33..957f5bff60c2029fbe084cba27fca31cbbe53682 100644 (file)
@@ -18,12 +18,12 @@ require 'jcode'
 require 'iconv'
 
 class UnicodePlugin < Plugin
-    BotConfig.register BotConfigBooleanValue.new(
+    Config.register Config::BooleanValue.new(
     'encoding.enable', :default => true,
     :desc => "Support for non-ascii charsets",
     :on_change => Proc.new { |bot, v| reconfigure_filter(bot) })
 
-    BotConfig.register BotConfigArrayValue.new(
+    Config.register Config::ArrayValue.new(
     'encoding.charsets', :default => ['utf-8', 'cp1252', 'iso-8859-15'],
     :desc => "Ordered list of iconv(3) charsets the bot should try",
     :on_change => Proc.new { |bot, v| reconfigure_filter(bot) })
@@ -31,7 +31,7 @@ class UnicodePlugin < Plugin
     class UnicodeFilter
         def initialize(oenc, *iencs)
             o = oenc.dup
-            o += '//ignore' if !o.include?('/')
+            o += '//ignore' if !o.include?('/')
             i = iencs[0].dup
             # i += '//ignore' if !i.include?('/')
             @iencs = iencs.dup
@@ -75,6 +75,7 @@ class UnicodePlugin < Plugin
         debug "cleaning up encodings"
         @bot.socket.filter = nil
         $KCODE = @old_kcode
+        super
     end
 
     def UnicodePlugin.reconfigure_filter(bot)