Make iniswap detection ignore case

This commit is contained in:
in1tiate 2021-06-17 03:32:01 -05:00
parent 4c32cf86cc
commit bdd5ad745c

View File

@ -517,11 +517,11 @@ AOPacket AOClient::validateIcPacket(AOPacket packet)
args.append(incoming_args[1].toString());
// char name
if (current_char != incoming_args[2].toString()) {
if (current_char.toLower() != incoming_args[2].toString().toLower()) {
// Selected char is different from supplied folder name
// This means the user is INI-swapped
if (!area->iniswapAllowed()) {
if (!server->characters.contains(incoming_args[2].toString()))
if (!server->characters.contains(incoming_args[2].toString(), Qt::CaseInsensitive))
return invalid;
}
qDebug() << "INI swap detected from " << getIpid();