summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/urban.rb
diff options
context:
space:
mode:
authorDavid Gadling <dave@toasterwaffles.com>2009-05-21 11:53:19 -0700
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-05-21 22:09:28 +0200
commit7f244f32d974cafa74f449853f940f194d08d6d2 (patch)
treeb72684ce149254edaf2dba993c409a640cc43086 /data/rbot/plugins/urban.rb
parentd8fd18fe30013ba7705aaeb5dd4521cbe013b824 (diff)
multiple plugins: Changes to remove parenthesize warnings.
All of these modules/plugins were generating warnings like this: warning: parenthesize argument(s) for future version This patch should fix all the warnings without affecting functionality.
Diffstat (limited to 'data/rbot/plugins/urban.rb')
-rw-r--r--data/rbot/plugins/urban.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb
index 24c11dd7..6f052fcf 100644
--- a/data/rbot/plugins/urban.rb
+++ b/data/rbot/plugins/urban.rb
@@ -17,7 +17,7 @@ class UrbanPlugin < Plugin
u = URBAN + URI.escape(word)
u += '&page=' + p.to_s if p > 1
s = @bot.httputil.get(u)
- return m.reply "Couldn't get the urban dictionary definition for #{word}" if s.nil?
+ return m.reply("Couldn't get the urban dictionary definition for #{word}") if s.nil?
notfound = s.match %r{<div style="color: #669FCE"><i>.*?</i> isn't defined}
@@ -48,7 +48,7 @@ class UrbanPlugin < Plugin
resp = @bot.httputil.head('http://www.urbandictionary.com/random.php',
:max_redir => -1,
:cache => false)
- return m.reply "Couldn't get a random urban dictionary word" if resp.nil?
+ return m.reply("Couldn't get a random urban dictionary word") if resp.nil?
if resp.code == "302" && (loc = resp['location'])
words = URI.unescape(loc.match(/define.php\?term=(.*)$/)[1]) rescue nil
end