Merge pull request #142 from AttorneyOnline/case-sens

Make iniswap detection case-insensitive
This commit is contained in:
scatterflower 2021-06-21 21:45:18 -05:00 committed by GitHub
commit 3d0b954536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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