summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-06-24 15:47:40 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-06-24 17:39:39 +0200
commita2cd248f43fafdd9f385e52403c145f4e5e9fc75 (patch)
tree301183adb59d0a76be4238ad6d478b9395091a84 /data/rbot/plugins
parent7149b0ff091f7d0f61027579c8b3dd6946808ee0 (diff)
lastfm plugin: code cleanup and warning suppression
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/lastfm.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index e14eb94b..628eb8d4 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -160,9 +160,9 @@ class LastFmPlugin < Plugin
def now_playing(m, params)
opts = { :cache => false }
user = nil
- if params[:who] then
+ if params[:who]
user = params[:who].to_s
- elsif @registry.has_key? ( m.sourcenick ) then
+ elsif @registry.has_key? m.sourcenick
user = @registry[ m.sourcenick ]
else
# m.reply "I don't know who you are on last.fm. Use 'lastfm set username' to identify yourself."
@@ -188,7 +188,7 @@ class LastFmPlugin < Plugin
end
else
return if params[:recurs]
- if @registry.has_key? ( user ) then
+ if @registry.has_key? user
params[:who] = @registry[ user ]
params[:recurs] = true
now_playing(m, params)
@@ -251,12 +251,12 @@ class LastFmPlugin < Plugin
def get_user(m, params)
nick = ""
- if params[:who] then
+ if params[:who]
nick = params[:who].to_s
else
nick = m.sourcenick
end
- if @registry.has_key?( nick ) then
+ if @registry.has_key? nick
user = @registry[ nick ]
m.reply "#{nick} is #{user} at last.fm"
else
@@ -270,7 +270,7 @@ class LastFmPlugin < Plugin
user = nil
if params[:user] then
user = params[:user].to_s
- elsif @registry.has_key? ( m.sourcenick ) then
+ elsif @registry.has_key? m.sourcenick
user = @registry[ m.sourcenick ]
else
# m.reply "I don't know who you are on last.fm. Use 'lastfm set username' to identify yourself."