summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/translator.rb
diff options
context:
space:
mode:
authorDmitry Kim <dmitry point kim at gmail point com>2007-09-11 17:38:23 +0000
committerDmitry Kim <dmitry point kim at gmail point com>2007-09-11 17:38:23 +0000
commitb28d910db82ac1e8933bf6a7b0f52d28a293fbb6 (patch)
treed5f1f656b887ac097c652763974531389b88b80d /data/rbot/plugins/translator.rb
parenta6738b25dbe4f8eee9223a60622abac5ac6108e5 (diff)
* (plugins/fish,translator) long-running actions made threaded to avoid blocking
Diffstat (limited to 'data/rbot/plugins/translator.rb')
-rw-r--r--data/rbot/plugins/translator.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/data/rbot/plugins/translator.rb b/data/rbot/plugins/translator.rb
index c2b74eeb..299d6a0e 100644
--- a/data/rbot/plugins/translator.rb
+++ b/data/rbot/plugins/translator.rb
@@ -271,7 +271,8 @@ class TranslatorPlugin < Plugin
TRANSLATORS.each_pair do |name, c|
begin
@translators[name] = c.new(@registry.sub_registry(name))
- map "#{name} :from :to *phrase", :action => :cmd_translate
+ map "#{name} :from :to *phrase",
+ :action => :cmd_translate, :thread => true
rescue Exception
warning _("Translator %{name} cannot be used: %{reason}") %
{:name => name, :reason => $!}
@@ -343,4 +344,5 @@ class TranslatorPlugin < Plugin
end
plugin = TranslatorPlugin.new
-plugin.map 'translator :from :to *phrase', :action => :cmd_translator
+plugin.map 'translator :from :to *phrase',
+ :action => :cmd_translator, :thread => true