diff --git a/include/aoclient.h b/include/aoclient.h index 8370489..64edf16 100644 --- a/include/aoclient.h +++ b/include/aoclient.h @@ -237,6 +237,7 @@ class AOClient : public QObject { void cmdClearDoc(int argc, QStringList argv); void cmdTimer(int argc, QStringList argv); void cmdEvidenceMod(int argc, QStringList argv); + void cmdSubTheme(int argc, QStringList argv); // Messaging/Client void cmdPos(int argc, QStringList argv); void cmdForcePos(int argc, QStringList argv); @@ -322,7 +323,7 @@ class AOClient : public QObject { {"bans", {ACLFlags.value("BAN"), 0, &AOClient::cmdBans}}, {"unban", {ACLFlags.value("BAN"), 1, &AOClient::cmdUnBan}}, {"removeuser", {ACLFlags.value("MODIFY_USERS"), 1, &AOClient::cmdRemoveUser}}, - + {"subtheme", {ACLFlags.value("CM"), 1, &AOClient::cmdSubTheme}}, }; QString partial_packet; diff --git a/src/commands.cpp b/src/commands.cpp index 63e7a39..cca5b40 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1015,6 +1015,16 @@ void AOClient::cmdUnBan(int argc, QStringList argv) sendServerMessage("Couldn't invalidate ban " + argv[0] + ", are you sure it exists?"); } +void AOClient::cmdSubTheme(int argc, QStringList argv) +{ + QString subtheme = argv.join(" "); + for (AOClient* client : server->clients) { + if (client->current_area == current_area) + client->sendPacket("ST", {subtheme, "1"}); + } + sendServerMessageArea("Subtheme was set to " + subtheme); +} + QStringList AOClient::buildAreaList(int area_idx) { QStringList entries;