Merge branch 'master' into recent-bans

This commit is contained in:
in1tiate 2021-03-14 17:44:02 -05:00 committed by GitHub
commit 4aba84734e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -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;

View File

@ -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;