]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/core/unicode.rb
* unicode.rb: @old_kcode --> @@old_kcode [we aren't always called as an instance]
[user/henk/code/ruby/rbot.git] / lib / rbot / core / unicode.rb
index 0c1912265624623c87403f11070d8c19406fe8f2..92294bb3f541f5fb88a45761dc2c429f68e01c5d 100644 (file)
@@ -62,14 +62,14 @@ class UnicodePlugin < CoreBotModule
 
     def initialize(*a)
         super
-        @old_kcode = $KCODE
+        @@old_kcode = $KCODE
         self.class.reconfigure_filter(@bot)
     end
 
     def cleanup
         debug "cleaning up encodings"
         @bot.socket.filter = nil
-        $KCODE = @old_kcode
+        $KCODE = @@old_kcode
         super
     end
 
@@ -78,7 +78,7 @@ class UnicodePlugin < CoreBotModule
         enable = bot.config['encoding.enable']
         if not enable
             bot.socket.filter = nil
-            $KCODE = @old_kcode
+            $KCODE = @@old_kcode
             return
         end
         charsets = bot.config['encoding.charsets']