diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-06 08:30:06 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-06 08:30:06 +0000 |
commit | ebfd1362c61505a9a972e136c820a428ba391172 (patch) | |
tree | 85cae8fe908bdbf0f8aee10aa96de964f2be4eaf /data | |
parent | 117180ab01270e60cf883acfe6382223ccb67f6e (diff) |
lastfm plugin: cleanup events display
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/lastfm.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 44e2e0b4..f87e5245 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -69,8 +69,20 @@ class LastFmPlugin < Plugin pre_events.each { |day, month, year, url_who, who, url_where, where, how_many| date = Time.utc(year.to_i, month.to_i, day.to_i) url = LASTFM + url_who - artist = who.ircify_html - loc = where.ircify_html + if who.match(/<strong>(.*?)<\/strong>(.*)?/) + artist = Bold + $1.ircify_html + Bold + artist << ": " << $2.ircify_html if $2 + else + debug "who: #{who.inspect}" + artist = who.ircify_html + end + if where.match(/<strong>(.*?)<\/strong>(.*)?/) + loc = Bold + $1.ircify_html + Bold + loc << ", " << $2.ircify_html if $2 + else + debug where.inspect + loc = where.ircify_html + end attendance = how_many.ircify_html events << LastFmEvent.new(url, date, artist, loc, attendance) } |