summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorRaine Virta <rane@kapsi.fi>2009-02-25 01:17:00 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-26 00:39:48 +0100
commit5bcdd4c8279b35d78ed80883a77b7e459228b92d (patch)
tree0d8d1048be7a7533245dfc3ffea4837bcd17a75a /data/rbot
parent20c191c1bf5925f90ebbe9a42726f743bd9bf606 (diff)
lastfm: show link to the user's profile in np action
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/lastfm.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index e13b6786..a5f526f1 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -276,7 +276,7 @@ class LastFmPlugin < Plugin
album = ""
if albumtxt
year = get_album(artist, albumtxt)[2]
- album = "[#{albumtxt}, #{year}] " if year
+ album = "[#{albumtxt}, #{year}]" if year
end
past = nil
date = XPath.first(first, "//date")
@@ -289,15 +289,18 @@ class LastFmPlugin < Plugin
if @registry.has_key? "#{m.sourcenick}_verb_present"
verb = @registry["#{m.sourcenick}_verb_present"]
end
- m.reply _("%{u} %{v} \"%{t}\" by %{a} %{b}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album}
+ reply = _("%{u} %{v} \"%{t}\" by %{a} %{b}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album}
else
verb = _("listened to")
if @registry.has_key? "#{m.sourcenick}_verb_past"
verb = @registry["#{m.sourcenick}_verb_past"]
end
ago = Utils.timeago(past)
- m.reply _("%{u} %{v} \"%{t}\" by %{a} %{b}%{p}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album, :p => ago}
+ reply = _("%{u} %{v} \"%{t}\" by %{a} %{b} %{p}") % {:u => user, :v => verb, :t => track, :a => artist, :b => album, :p => ago}
end
+
+ reply << _("; see %{uri} for more") % { :uri => "http://www.last.fm/user/#{CGI.escape user}"}
+ m.reply reply
end
def find_artist(m, params)