summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-16 22:34:23 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-16 22:34:23 +0100
commit44dcfe27b196bafb4fd3b6f1cf4e3256846d37c6 (patch)
treede263e66a43a925395c51de10ab4beba9471f183 /data
parent784ca0872a8d285854fe3ebbf90aefe5296a4439 (diff)
lastfm: put URL in artist summary
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/lastfm.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index 29f85aab..0600c106 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -288,10 +288,12 @@ class LastFmPlugin < Plugin
end
first = doc.root.elements["artist"]
artist = first.elements["name"].text
+ url = first.elements["url"].text
playcount = first.elements["stats"].elements["playcount"].text
listeners = first.elements["stats"].elements["listeners"].text
summary = first.elements["bio"].elements["summary"].text
- m.reply _("%{b}%{a}%{b} has been played %{c} times and is being listened to by %{l} people") % {:b => Bold, :a => artist, :c => playcount, :l => listeners}
+ m.reply _("%{b}%{a}%{b} <%{u}> has been played %{c} times and is being listened to by %{l} people") % {
+ :b => Bold, :a => artist, :u => url, :c => playcount, :l => listeners}
m.reply summary.ircify_html
end