]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/wow.rb
quiz: stop quizzes and timers on cleanup
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / wow.rb
index e1c7a4a4ee20ab6bab338272f52a91c5abb2f8c4..8701c7672a2656df3d3923846bc1658ecf758059 100644 (file)
@@ -90,13 +90,14 @@ 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'],
               realm_data.attributes['s'].to_i,
               realm_data.attributes['t'].to_i,
               realm_data.attributes['l'].to_i)
+            realm.to_s
           else
             "realm #{realm_name} not found."
           end