summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/translator.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/rbot/plugins/translator.rb b/data/rbot/plugins/translator.rb
index c4eaac4f..8d8e5388 100644
--- a/data/rbot/plugins/translator.rb
+++ b/data/rbot/plugins/translator.rb
@@ -453,10 +453,10 @@ end
plugin = TranslatorPlugin.new
req = Hash[*%w(from to).map { |e| [e.to_sym, /#{plugin.languages.join("|")}/] }.flatten]
-plugin.map 'translate [:from] [:to] *url',
- :action => :cmd_translate_url, :requirements => req.merge(:url => %r{^https?://.*})
-plugin.map 'translator [:from] [:to] *url',
- :action => :cmd_translate_url, :requirements => req.merge(:url => %r{^https?://.*})
+plugin.map 'translate [:from] [:to] :url',
+ :action => :cmd_translate_url, :requirements => req.merge(:url => %r{^https?://[^\s]*})
+plugin.map 'translator [:from] [:to] :url',
+ :action => :cmd_translate_url, :requirements => req.merge(:url => %r{^https?://[^\s]*})
plugin.map 'translate [:from] [:to] *phrase',
:action => :cmd_translator, :thread => true, :requirements => req
plugin.map 'translator [:from] [:to] *phrase',