Merge pull request #192 from Salanto/fix-#191
Allow spaces to be contained in background names
This commit is contained in:
commit
958752ef0a
@ -254,12 +254,13 @@ void AOClient::cmdAreaKick(int argc, QStringList argv)
|
||||
|
||||
void AOClient::cmdSetBackground(int argc, QStringList argv)
|
||||
{
|
||||
QString f_background = argv.join(" ");
|
||||
AreaData* area = server->areas[current_area];
|
||||
if (authenticated || !area->bgLocked()) {
|
||||
if (server->backgrounds.contains(argv[0], Qt::CaseInsensitive) || area->ignoreBgList() == true) {
|
||||
area->setBackground(argv[0]);
|
||||
server->broadcast(AOPacket("BN", {argv[0]}), current_area);
|
||||
sendServerMessageArea(current_char + " changed the background to " + argv[0]);
|
||||
if (server->backgrounds.contains(f_background, Qt::CaseInsensitive) || area->ignoreBgList() == true) {
|
||||
area->setBackground(f_background);
|
||||
server->broadcast(AOPacket("BN", {f_background}), current_area);
|
||||
sendServerMessageArea(current_char + " changed the background to " + f_background);
|
||||
}
|
||||
else {
|
||||
sendServerMessage("Invalid background name.");
|
||||
|
Loading…
Reference in New Issue
Block a user