summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/unicode.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rbot/core/unicode.rb b/lib/rbot/core/unicode.rb
index 92294bb3..9d42ec24 100644
--- a/lib/rbot/core/unicode.rb
+++ b/lib/rbot/core/unicode.rb
@@ -21,6 +21,7 @@ class UnicodePlugin < CoreBotModule
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",
+ :validate_item => Proc.new { |x| !!(Iconv.new('utf-8', x) rescue nil) },
:on_change => Proc.new { |bot, v| reconfigure_filter(bot) })
class UnicodeFilter