{
xmlDocPtr doc = xmlParseFile("http://forgottenserver.otland.net/statuslist.xml");
if(!doc)
return false;
xmlNodePtr p, root = xmlDocGetRootElement(doc);
if(!xmlStrcmp(root->name, (const xmlChar*)"statuslist"))
{
p = root->children;
while(p)
{
if(!xmlStrcmp(p->name, (const xmlChar*)"blacklist"))
{
std::string ip;
if(readXMLString(p, "ip", ip))
blacklist.push_back(ip);
}
else if(!xmlStrcmp(p->name, (const xmlChar*)"whitelist"))
{
std::string ip;
if(readXMLString(p, "ip", ip))
whitelist.push_back(ip);
}
p = p->next;
}
}
xmlFreeDoc(doc);
return true;
}
So where to find this?C++:{ xmlDocPtr doc = xmlParseFile("http://forgottenserver.otland.net/statuslist.xml"); if(!doc) return false; xmlNodePtr p, root = xmlDocGetRootElement(doc); if(!xmlStrcmp(root->name, (const xmlChar*)"statuslist")) { p = root->children; while(p) { if(!xmlStrcmp(p->name, (const xmlChar*)"blacklist")) { std::string ip; if(readXMLString(p, "ip", ip)) blacklist.push_back(ip); } else if(!xmlStrcmp(p->name, (const xmlChar*)"whitelist")) { std::string ip; if(readXMLString(p, "ip", ip)) whitelist.push_back(ip); } p = p->next; } } xmlFreeDoc(doc); return true; }
If I remove this code will I have future problems?
game.cppSo where to find this?