From 338b9baef1bfe6b40cc88434903f6c1d01391ba3 Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Mon, 7 Dec 2009 00:32:42 +0200 Subject: lastfm: fix detection of invalid username on now_playing --- data/rbot/plugins/lastfm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index cf799045..3d0b79be 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -336,7 +336,7 @@ class LastFmPlugin < Plugin return end if xml.class == Net::HTTPBadRequest - if doc.root.elements["error"].text == "Invalid user name supplied" then + if doc.root.elements["error"].attributes["code"] == "6" then m.reply _("%{user} doesn't exist on last.fm, perhaps they need to: lastfm user ") % { :user => user } -- cgit v1.2.3