From 60adf6d9d65f4268aefb335f54cfbda218fe9676 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 8 Apr 2008 15:00:01 +0200 Subject: [PATCH] ascent plugin: Fix classes/races and ignore unhandled tags. Classes and races were exchanged, this was fixed. --- src/ascent.c | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/src/ascent.c b/src/ascent.c index b63f73e9..75d5cb61 100644 --- a/src/ascent.c +++ b/src/ascent.c @@ -28,23 +28,6 @@ #include static char *races_list[] = /* {{{ */ -{ - NULL, - "Warrior", /* 1 */ - "Paladin", /* 2 */ - "Hunter", /* 3 */ - "Rogue", /* 4 */ - "Priest", /* 5 */ - NULL, - "Shaman", /* 7 */ - "Mage", /* 8 */ - "Warlock", /* 9 */ - NULL, - "Druid" /* 11 */ -}; /* }}} */ -#define RACES_LIST_LENGTH STATIC_ARRAY_SIZE (races_list) - -static char *classes_list[] = /* {{{ */ { NULL, "Human", /* 1 */ @@ -59,6 +42,23 @@ static char *classes_list[] = /* {{{ */ "Bloodelf", /* 10 */ "Draenei" /* 11 */ }; /* }}} */ +#define RACES_LIST_LENGTH STATIC_ARRAY_SIZE (races_list) + +static char *classes_list[] = /* {{{ */ +{ + NULL, + "Warrior", /* 1 */ + "Paladin", /* 2 */ + "Hunter", /* 3 */ + "Rogue", /* 4 */ + "Priest", /* 5 */ + NULL, + "Shaman", /* 7 */ + "Mage", /* 8 */ + "Warlock", /* 9 */ + NULL, + "Druid" /* 11 */ +}; /* }}} */ #define CLASSES_LIST_LENGTH STATIC_ARRAY_SIZE (classes_list) static char *genders_list[] = /* {{{ */ @@ -392,6 +392,22 @@ static int ascent_xml_status (xmlDoc *doc, xmlNode *node) /* {{{ */ ascent_xml_submit_gauge (doc, child, NULL, "players", "horde"); else if (xmlStrcmp ((const xmlChar *) "qplayers", child->name) == 0) ascent_xml_submit_gauge (doc, child, NULL, "players", "queued"); + else if ((xmlStrcmp ((const xmlChar *) "acceptedconns", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "avglat", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "cdbquerysize", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "cpu", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "fthreads", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "gmcount", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "lastupdate", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "ontime", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "oplayers", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "peakcount", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "platform", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "ram", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "threads", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "uptime", child->name) == 0) + || (xmlStrcmp ((const xmlChar *) "wdbquerysize", child->name) == 0)) + /* ignore */; else { WARNING ("ascent plugin: ascent_xml_status: Unknown tag: %s", child->name); -- 2.30.2