Merge pull request #157 from AttorneyOnline/case-sens-2

Make /bg case insensitive
This commit is contained in:
Rose Witchaven 2021-07-29 03:54:30 -05:00 committed by GitHub
commit 325d63d877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,7 +239,7 @@ void AOClient::cmdSetBackground(int argc, QStringList argv)
{
AreaData* area = server->areas[current_area];
if (authenticated || !area->bgLocked()) {
if (server->backgrounds.contains(argv[0]) || area->ignoreBgList() == true) {
if (server->backgrounds.contains(argv[0], Qt::CaseInsensitive) || area->ignoreBgList() == true) {
area->background() = argv[0];
server->broadcast(AOPacket("BN", {argv[0]}), current_area);
sendServerMessageArea(current_char + " changed the background to " + argv[0]);