summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2006-01-21 21:29:50 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2006-01-21 21:29:50 +0000
commit7b35a6bfcd69da8b308dd1bc8cb0b9218caf4504 (patch)
tree28fdac45afb4e8cdfe8bc5355cb5ba0bc313da48 /data
parent119892c09183cf09ef5247664ec3d9daa7b7a042 (diff)
comma sep
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/lastfm.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index 1d48b6d0..63935da1 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -14,9 +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]}:"
- data.to_a[0..2].each do |line|
- m.reply line.split(',')[-1]
- end
+ m.reply data.to_a[0..3].map{|l| l.split(',')[-1].chomp}.join(", ")
rescue
m.reply "could not find #{params[:action]} for #{params[:user]} (is #{params[:user]} a user?)"
end