commit
e680bb9e07
@ -220,6 +220,7 @@ class AOClient : public QObject {
|
||||
void cmdKick(int argc, QStringList argv);
|
||||
void cmdAnnounce(int argc, QStringList argv);
|
||||
void cmdM(int argc, QStringList argv);
|
||||
void cmdGM(int argc, QStringList argv);
|
||||
// Casing/RP
|
||||
void cmdPlay(int argc, QStringList argv);
|
||||
void cmdNeed(int argc, QStringList argv);
|
||||
@ -308,6 +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("MODCHAT"), 1, &AOClient::cmdGM}}
|
||||
};
|
||||
|
||||
QString partial_packet;
|
||||
|
@ -891,6 +891,18 @@ void AOClient::cmdM(int argc, QStringList argv)
|
||||
return;
|
||||
}
|
||||
|
||||
void AOClient::cmdGM(int argc, QStringList argv)
|
||||
{
|
||||
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});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QStringList AOClient::buildAreaList(int area_idx)
|
||||
{
|
||||
QStringList entries;
|
||||
|
Loading…
Reference in New Issue
Block a user