Add /g command
This commit is contained in:
parent
ed9e86e183
commit
3f148c9c66
@ -171,6 +171,7 @@ class AOClient : public QObject {
|
||||
void cmdListUsers(int argc, QStringList argv);
|
||||
void cmdLogout(int argc, QStringList argv);
|
||||
void cmdPos(int argc, QStringList argv);
|
||||
void cmdG(int argc, QStringList argv);
|
||||
|
||||
// Command helper functions
|
||||
QStringList buildAreaList(int area_idx);
|
||||
@ -202,7 +203,8 @@ class AOClient : public QObject {
|
||||
{"removeperm", {ACLFlags.value("MODIFY_USERS"), 2, &AOClient::cmdRemovePerms}},
|
||||
{"listusers", {ACLFlags.value("MODIFY_USERS"), 0, &AOClient::cmdListUsers}},
|
||||
{"logout", {ACLFlags.value("NONE"), 0, &AOClient::cmdLogout}},
|
||||
{"pos", {ACLFlags.value("NONE"), 1, &AOClient::cmdPos}}
|
||||
{"pos", {ACLFlags.value("NONE"), 1, &AOClient::cmdPos}},
|
||||
{"g", {ACLFlags.value("NONE"), 1, &AOClient::cmdG}}
|
||||
};
|
||||
|
||||
QString partial_packet;
|
||||
|
@ -371,6 +371,14 @@ void AOClient::cmdPos(int argc, QStringList argv)
|
||||
sendServerMessage("Position changed to " + pos + ".");
|
||||
}
|
||||
|
||||
void AOClient::cmdG(int argc, QStringList argv)
|
||||
{
|
||||
QString sender_name = ooc_name;
|
||||
QString sender_message = argv.join(" ");
|
||||
server->broadcast(AOPacket("CT", {"[G]" + sender_name, sender_message}));
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList AOClient::buildAreaList(int area_idx)
|
||||
{
|
||||
QStringList entries;
|
||||
|
Loading…
Reference in New Issue
Block a user