add iniswap locking

This commit is contained in:
in1tiate 2021-03-09 13:23:32 -06:00
parent 505c729f7f
commit 088b34064f
2 changed files with 6 additions and 5 deletions

View File

@ -27,7 +27,8 @@ AreaData::AreaData(QStringList characters, QString p_name, int p_index)
QSettings areas_ini("config/areas.ini", QSettings::IniFormat); QSettings areas_ini("config/areas.ini", QSettings::IniFormat);
areas_ini.beginGroup(p_name); areas_ini.beginGroup(p_name);
background = areas_ini.value("background", "gs4").toString(); background = areas_ini.value("background", "gs4").toString();
is_protected = areas_ini.value("protected_area").toBool(); is_protected = areas_ini.value("protected_area", "false").toBool();
iniswap_allowed = areas_ini.value("iniswap_allowed", "true").toBool();
areas_ini.endGroup(); areas_ini.endGroup();
player_count = 0; player_count = 0;
locked = FREE; locked = FREE;

View File

@ -362,10 +362,10 @@ AOPacket AOClient::validateIcPacket(AOPacket packet)
if (current_char != incoming_args[2].toString()) { if (current_char != incoming_args[2].toString()) {
// Selected char is different from supplied folder name // Selected char is different from supplied folder name
// This means the user is INI-swapped // This means the user is INI-swapped
// TODO: ini swap locking if (!area->iniswap_allowed) {
// if no iniswap allowed then if (!server->characters.contains(incoming_args[2].toString()))
// if (!server->characters.contains(incoming_args[2].toString())) return invalid;
// return invalid; }
qDebug() << "INI swap detected from " << getIpid(); qDebug() << "INI swap detected from " << getIpid();
} }
args.append(incoming_args[2].toString()); args.append(incoming_args[2].toString());