diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2007-08-11 03:57:13 +0000 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2007-08-11 03:57:13 +0000 |
commit | dc037235e33a99242e612f9465398cbecdfbc173 (patch) | |
tree | e7dcbdc972605b932449a7562290f3c2fa0dd157 | |
parent | c6a2d538ad42c905aeb4ebaf3047df83d58acddd (diff) |
* translator.rb: use Irc::Utils.bot
-rw-r--r-- | data/rbot/plugins/translator.rb | 4 |
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' |