diff --git a/include/aoclient.h b/include/aoclient.h index 6fbb981..4ff94c7 100644 --- a/include/aoclient.h +++ b/include/aoclient.h @@ -309,7 +309,7 @@ class AOClient : public QObject { {"motd", {ACLFlags.value("NONE"), 0, &AOClient::cmdMOTD}}, {"announce", {ACLFlags.value("ANNOUNCE"), 1, &AOClient::cmdAnnounce}}, {"m", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdM}}, - {"gm", {ACLFlags.value("GM"), 1, &AOClient::cmdGM}} + {"gm", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdGM}} }; QString partial_packet; diff --git a/src/commands.cpp b/src/commands.cpp index 2cd968f..9d98004 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -892,18 +892,14 @@ void AOClient::cmdM(int argc, QStringList argv) void AOClient::cmdGM(int argc, QStringList argv) { - if (checkAuth(ACLFlags.value("MODCHAT"))) { - QString sender_name = ooc_name; - QString sender_area = server->area_names.value(current_area); - QString sender_message = argv.join(" "); - for (AOClient* client : server->clients) { - if (client->global_enabled) - client->sendPacket("CT", {"[G][" + sender_area + "]" + "["+sender_name+"][M]", sender_message}); + QString sender_name = ooc_name; + QString sender_area = server->area_names.value(current_area); + QString sender_message = argv.join(" "); + for (AOClient* client : server->clients) { + if (client->global_enabled) { + client->sendPacket("CT", {"[G][" + sender_area + "]" + "["+sender_name+"][M]", sender_message}); } } - else { - sendServerMessage("You do not have permission to use Global Mod Message."); - } } QStringList AOClient::buildAreaList(int area_idx)