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