# :title: Unicode plugin
#
# Author:: jsn (Dmitry Kim) <dmitry dot kim at gmail dot org>
-# Copyright:: (C) 2007 Dmitry Kim
-# License:: public domain
#
# This plugin adds unicode-awareness to rbot. When it's loaded, all the
# character strings inside of rbot are assumed to be in proper utf-8
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
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']