diff --git a/include/aoclient.h b/include/aoclient.h index fc6daba..96a6a60 100644 --- a/include/aoclient.h +++ b/include/aoclient.h @@ -1850,6 +1850,18 @@ class AOClient : public QObject { {"allowiniswap", {ACLFlags.value("CM"), 0, &AOClient::cmdAllowIniswap}}, {"allow_iniswap", {ACLFlags.value("CM"), 0, &AOClient::cmdAllowIniswap}}, {"afk", {ACLFlags.value("NONE"), 0, &AOClient::cmdAfk}}, + {"oocmute", {ACLFlags.value("MUTE"), 1, &AOClient::cmdOocMute}}, + {"ooc_mute", {ACLFlags.value("MUTE"), 1, &AOClient::cmdOocMute}}, + {"oocunmute", {ACLFlags.value("MUTE"), 1, &AOClient::cmdOocUnMute}}, + {"ooc_unmute", {ACLFlags.value("MUTE"), 1, &AOClient::cmdOocUnMute}}, + {"blockwtce", {ACLFlags.value("MUTE"), 1, &AOClient::cmdBlockWtce}}, + {"block_wtce", {ACLFlags.value("MUTE"), 1, &AOClient::cmdBlockWtce}}, + {"unblockwtce", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnBlockWtce}}, + {"unblock_wtce", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnBlockWtce}}, + {"blockdj", {ACLFlags.value("MUTE"), 1, &AOClient::cmdBlockDj}}, + {"block_dj", {ACLFlags.value("MUTE"), 1, &AOClient::cmdBlockDj}}, + {"unblockdj", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnBlockDj}}, + {"unblock_dj", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnBlockDj}}, }; /** diff --git a/src/commands/music.cpp b/src/commands/music.cpp index 4bde396..2ae0f71 100644 --- a/src/commands/music.cpp +++ b/src/commands/music.cpp @@ -22,6 +22,10 @@ void AOClient::cmdPlay(int argc, QStringList argv) { + if (is_dj_blocked) { + sendServerMessage("You are blocked from changing the music."); + return; + } AreaData* area = server->areas[current_area]; QString song = argv.join(" "); area->current_music = song; diff --git a/src/packets.cpp b/src/packets.cpp index b5f33e3..5ffede7 100644 --- a/src/packets.cpp +++ b/src/packets.cpp @@ -210,10 +210,6 @@ void AOClient::pktPing(AreaData* area, int argc, QStringList argv, AOPacket pack void AOClient::pktChangeMusic(AreaData* area, int argc, QStringList argv, AOPacket packet) { - if (is_dj_blocked) { - sendServerMessage("You are blocked from changing the music."); - return; - } // Due to historical reasons, this // packet has two functions: // Change area, and set music. @@ -225,6 +221,10 @@ void AOClient::pktChangeMusic(AreaData* area, int argc, QStringList argv, AOPack for (QString song : server->music_list) { if (song == argument || song == "~stop.mp3") { // ~stop.mp3 is a dummy track used by 2.9+ // We have a song here + if (is_dj_blocked) { + sendServerMessage("You are blocked from changing the music."); + return; + } QString effects; if (argc >= 4) effects = argv[3];