summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-05 16:25:30 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-05 16:25:30 +0000
commit56889ab64a8b60dba2a4aaaf876386841213b14a (patch)
tree08951db289eefbed410f40fc2def295a9168af1b /data
parentcfe07a79b206338cd8e97e65ace943afad80bbf0 (diff)
lastfm plugin: fix incorrect song info when title or author contained a comma
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/lastfm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index 63935da1..c2084186 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -14,7 +14,7 @@ class LastFmPlugin < Plugin
end
data = open("http://ws.audioscrobbler.com/1.0/user/#{params[:user]}/#{params[:action]}.txt")
m.reply "#{params[:action]} for #{params[:user]}:"
- m.reply data.to_a[0..3].map{|l| l.split(',')[-1].chomp}.join(", ")
+ m.reply data.to_a[0..3].map{|l| l.split(',',2)[-1].chomp}.join(", ")
rescue
m.reply "could not find #{params[:action]} for #{params[:user]} (is #{params[:user]} a user?)"
end