From ed15b7b97190d86d741e27b7d52dee6a796e694e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 7 Aug 2008 00:08:56 +0200 Subject: wow plugin: fix realm extraction xpath --- data/rbot/plugins/wow.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/rbot/plugins/wow.rb b/data/rbot/plugins/wow.rb index e1c7a4a4..1350dd1a 100644 --- a/data/rbot/plugins/wow.rb +++ b/data/rbot/plugins/wow.rb @@ -90,7 +90,7 @@ class RealmPlugin < Plugin xmldoc = @bot.httputil.get("http://www.worldofwarcraft.com/realmstatus/status.xml", :cache => false) raise "unable to retrieve realm status" unless xmldoc realm_list = (REXML::Document.new xmldoc).root - realm_data = realm_list.elements["r[@n=\"#{realm_name}\"]"] + realm_data = realm_list.get_elements("//r[@n=\"#{realm_name}\"]").first if realm_data and realm_data.attributes.any? then realm = Realm.new( realm_data.attributes['n'], -- cgit v1.2.3