| 26 | #include <string> |
| 27 | |
| 28 | bz_BasePlayerRecord* getPlayerFromGUID(const std::string GUID) { |
| 29 | std::vector<std::string> parts = tokenize(GUID, std::string("_"), 2, false); |
| 30 | if (parts.size() < 2) { |
| 31 | return NULL; |
| 32 | } |
| 33 | |
| 34 | int slot = atoi(parts[0].c_str()); |
| 35 | |
| 36 | bz_BasePlayerRecord* rec = bz_getPlayerByIndex(slot); |
| 37 | if (!rec) { |
| 38 | return NULL; |
| 39 | } |
| 40 | |
| 41 | if (rec->callsign == parts[1]) { |
| 42 | return rec; |
| 43 | } |
| 44 | |
| 45 | bz_freePlayerRecord(rec); |
| 46 | return NULL; |
| 47 | } |
| 48 | |
| 49 | bool UpdateBZDBVars::process(std::string& inputPage, |
| 50 | const HTTPRequest& request, HTTPReply& reply) { |
no test coverage detected