33 std::ifstream file(path);
34 if (!file.is_open())
return false;
37 while (std::getline(file, line)) {
39 if (line.empty() || line[0] ==
'#')
continue;
41 size_t eq = line.find(
'=');
42 if (eq == std::string::npos)
continue;
44 std::string key = line.substr(0, eq);
45 std::string value = line.substr(eq + 1);
50 else if (key ==
"scale_cooldown")
scaleCooldown = std::stoi(value);
51 else if (key ==
"min_threshold")
minThreshold = std::stoi(value);
52 else if (key ==
"max_threshold")
maxThreshold = std::stoi(value);
56 else if (key ==
"colors_enabled")
colorsEnabled = (value ==
"1" || value ==
"true" || value ==
"yes");
57 else if (key ==
"status_interval")
statusInterval = std::stoi(value);
58 else if (key ==
"blocked_octets") {
61 std::string parseVal = value;
62 if (parseVal.size() >= 2 && parseVal.front() ==
'{' && parseVal.back() ==
'}') {
63 parseVal = parseVal.substr(1, parseVal.size() - 2);
65 std::istringstream iss(parseVal);
67 while (std::getline(iss, octetStr,
',')) {
69 if (!octetStr.empty()) {