diff --git a/core/include/area_data.h b/core/include/area_data.h index 94bac98..6e15e89 100644 --- a/core/include/area_data.h +++ b/core/include/area_data.h @@ -109,12 +109,13 @@ class AreaData : public QObject { /** * @brief The level of "authorisation" needed to be able to modify, add, and remove evidence in the area. */ - enum EvidenceMod{ + enum class EvidenceMod{ FFA, MOD, CM, HIDDEN_CM }; + Q_ENUM(EvidenceMod) /** * @var EvidenceMod FFA diff --git a/core/src/aoclient.cpp b/core/src/aoclient.cpp index 8bd6461..a085ac2 100644 --- a/core/src/aoclient.cpp +++ b/core/src/aoclient.cpp @@ -258,8 +258,9 @@ void AOClient::sendPacket(AOPacket packet) #endif packet.contents.replaceInStrings("#", "") .replaceInStrings("%", "") - .replaceInStrings("$", "") - .replaceInStrings("&", ""); + .replaceInStrings("$", ""); + if (packet.header != "LE") + packet.contents.replaceInStrings("&", ""); socket->write(packet.toUtf8()); socket->flush(); } diff --git a/core/src/area_data.cpp b/core/src/area_data.cpp index fdd7b16..5f5fb4a 100644 --- a/core/src/area_data.cpp +++ b/core/src/area_data.cpp @@ -42,7 +42,7 @@ AreaData::AreaData(QString p_name, int p_index) : m_isProtected = areas_ini.value("protected_area", "false").toBool(); m_iniswapAllowed = areas_ini.value("iniswap_allowed", "true").toBool(); m_bgLocked = areas_ini.value("bg_locked", "false").toBool(); - QString configured_evi_mod = areas_ini.value("evidence_mod", "FFA").toString().toLower(); + m_eviMod = QVariant(areas_ini.value("evidence_mod", "FFA").toString().toUpper()).value(); m_blankpostingAllowed = areas_ini.value("blankposting_allowed","true").toBool(); m_forceImmediate = areas_ini.value("force_immediate", "false").toBool(); m_toggleMusic = areas_ini.value("toggle_music", "true").toBool(); @@ -62,15 +62,6 @@ AreaData::AreaData(QString p_name, int p_index) : m_timers.append(timer3); QTimer* timer4 = new QTimer(); m_timers.append(timer4); - - if (configured_evi_mod == "cm") - m_eviMod = EvidenceMod::CM; - else if (configured_evi_mod == "mod") - m_eviMod = EvidenceMod::MOD; - else if (configured_evi_mod == "hiddencm") - m_eviMod = EvidenceMod::HIDDEN_CM; - else - m_eviMod = EvidenceMod::FFA; } const QMap AreaData::map_statuses = { diff --git a/core/src/config_manager.cpp b/core/src/config_manager.cpp index bbe2759..9f15f08 100644 --- a/core/src/config_manager.cpp +++ b/core/src/config_manager.cpp @@ -162,7 +162,7 @@ int ConfigManager::webaoPort() DataTypes::AuthType ConfigManager::authType() { - QString l_auth = m_settings->value("Options/auth", "simple").toString(); + QString l_auth = m_settings->value("Options/auth", "simple").toString().toUpper(); return toDataType(l_auth); } @@ -184,7 +184,7 @@ int ConfigManager::logBuffer() DataTypes::LogType ConfigManager::loggingType() { - QString l_log = m_settings->value("Options/logging", "modcall").toString(); + QString l_log = m_settings->value("Options/logging", "modcall").toString().toUpper(); return toDataType(l_log); }