diff options
-rw-r--r-- | data/rbot/plugins/translator.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/data/rbot/plugins/translator.rb b/data/rbot/plugins/translator.rb index 3a371127..d4f55444 100644 --- a/data/rbot/plugins/translator.rb +++ b/data/rbot/plugins/translator.rb @@ -322,15 +322,8 @@ class TranslatorPlugin < Plugin def cmd_translator(m, params) params[:to] = @bot.config['translator.destination'] if params[:to].nil? - - # Use google translate as translator if source language has not been given - # and auto-detect it - if params[:from].nil? - params[:from] = "auto" - translator = "google_translate" - else - translator = @default_translators.find {|t| @translators[t].support?(params[:from], params[:to])} - end + params[:from] ||= 'auto' + translator = @default_translators.find {|t| @translators[t].support?(params[:from], params[:to])} if translator cmd_translate m, params.merge({:translator => translator, :show_provider => true}) |