summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/translator.rb
diff options
context:
space:
mode:
authorYaohan Chen <yaohan.chen@gmail.com>2007-08-11 03:57:13 +0000
committerYaohan Chen <yaohan.chen@gmail.com>2007-08-11 03:57:13 +0000
commitdc037235e33a99242e612f9465398cbecdfbc173 (patch)
treee7dcbdc972605b932449a7562290f3c2fa0dd157 /data/rbot/plugins/translator.rb
parentc6a2d538ad42c905aeb4ebaf3047df83d58acddd (diff)
* translator.rb: use Irc::Utils.bot
Diffstat (limited to 'data/rbot/plugins/translator.rb')
-rw-r--r--data/rbot/plugins/translator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/translator.rb b/data/rbot/plugins/translator.rb
index 47ff329f..0a1dc22d 100644
--- a/data/rbot/plugins/translator.rb
+++ b/data/rbot/plugins/translator.rb
@@ -239,8 +239,8 @@ class WorldlingoTranslator < Translator
end
def translate(text, from, to)
- response = Irc::Plugins.manager['translator'].bot.httputil.get_response(
- URI.escape("http://www.worldlingo.com/SEfpX0LV2xIxsIIELJ,2E5nOlz5RArCY,/texttranslate?wl_srcenc=utf-8&wl_trgenc=utf-8&wl_text=#{text}&wl_srclang=#{from.upcase}&wl_trglang=#{to.upcase}"))
+ response = Irc::Utils.bot.httputil.get_response(URI.escape(
+ "http://www.worldlingo.com/SEfpX0LV2xIxsIIELJ,2E5nOlz5RArCY,/texttranslate?wl_srcenc=utf-8&wl_trgenc=utf-8&wl_text=#{text}&wl_srclang=#{from.upcase}&wl_trglang=#{to.upcase}"))
# WorldLingo seems to respond an XML when error occurs
case response['Content-Type']
when %r'text/plain'