class UnicodePlugin
To set the encoding of strings coming from the irc server.
Public Class Methods
new(*a)
click to toggle source
Calls superclass method
# File lib/rbot/core/unicode.rb, line 34 def initialize(*a) super self.class.reconfigure_filter(@bot) end
reconfigure_filter(bot)
click to toggle source
# File lib/rbot/core/unicode.rb, line 45 def UnicodePlugin.reconfigure_filter(bot) debug "configuring encodings" charset = bot.config['encoding.charset'] if bot.config['encoding.enable'] bot.socket.filter = UnicodeFilter.new charset else bot.socket.filter = nil end end
Public Instance Methods
cleanup()
click to toggle source
Calls superclass method
# File lib/rbot/core/unicode.rb, line 39 def cleanup debug "cleaning up encodings" @bot.socket.filter = nil super end