MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / handleMsgSetVars

Function handleMsgSetVars

src/clientbase/playing.cpp:1496–1516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494
1495
1496void handleMsgSetVars(void* msg) {
1497 uint16_t numVars;
1498 std::string name;
1499 std::string value;
1500
1501 msg = nboUnpackUInt16(msg, numVars);
1502 for (int i = 0; i < numVars; i++) {
1503 msg = nboUnpackStdString(msg, name);
1504 msg = nboUnpackStdString(msg, value);
1505
1506 if (!name.empty() && ((name[0] == '_') || (name[0] == '$'))) {
1507 BZDB.set(name, value);
1508 BZDB.setPersistent(name, false);
1509 BZDB.setPermission(name, StateDatabase::Locked);
1510 }
1511 else {
1512 debugf(1, "Server BZDB change blocked: '%s' = '%s'\n",
1513 name.c_str(), value.c_str());
1514 }
1515 }
1516}
1517
1518
1519void handleReplayReset(void* msg, bool& checkScores) {

Callers 1

handleServerMessageFunction · 0.85

Calls 8

nboUnpackUInt16Function · 0.85
nboUnpackStdStringFunction · 0.85
debugfFunction · 0.85
setPersistentMethod · 0.80
setPermissionMethod · 0.80
c_strMethod · 0.80
emptyMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected