doc = Document.new xml.body
if xml.class == Net::HTTPInternalServerError
- if doc.root.attributes["status"] == "failed"
+ if doc.root and doc.root.attributes["status"] == "failed"
m.reply doc.root.elements["error"].text
else
m.reply _("Could not retrieve events")
plugin.map 'lastfm who', :action => :get_user, :thread => true
plugin.map 'lastfm compare :user1 :user2', :action => :tasteometer, :thread => true
plugin.map 'np', :action => :now_playing, :thread => true
-plugin.map 'lastfm', :action => :now_playing, :thread => true
plugin.map "lastfm [user] :action [:user]", :thread => true,
:requirements => { :action =>
/^(?:events|friends|neighbou?rs|playlists|recent?tracks|top(?:album|artist|tag)s?|weekly(?:album|artist|track)chart|weeklychartlist)$/
}
+plugin.map "lastfm [:who]", :action => :now_playing, :thread => true