Add /ungimp

This commit is contained in:
MangosArentLiterature 2021-04-09 15:07:09 -05:00
parent 23d50b9216
commit 43ce86ff12
2 changed files with 21 additions and 0 deletions

View File

@ -1648,6 +1648,7 @@ class AOClient : public QObject {
{"lm", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdLM}}, {"lm", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdLM}},
{"allow_blankposting", {ACLFlags.value("MODCHAT"), 0, &AOClient::cmdAllow_Blankposting}}, {"allow_blankposting", {ACLFlags.value("MODCHAT"), 0, &AOClient::cmdAllow_Blankposting}},
{"gimp", {ACLFlags.value("MUTE"), 1, &AOClient::cmdGimp}}, {"gimp", {ACLFlags.value("MUTE"), 1, &AOClient::cmdGimp}},
{"ungimp", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnGimp}},
}; };
/** /**

View File

@ -1296,6 +1296,26 @@ void AOClient::cmdGimp(int argc, QStringList argv)
target->is_gimped = true; target->is_gimped = true;
} }
void AOClient::cmdUnGimp(int argc, QStringList argv)
{
bool conv_ok = false;
int uid = argv[0].toInt(&conv_ok);
if (!conv_ok) {
sendServerMessage("Invalid user ID.");
return;
}
AOClient* target = server->getClientByID(uid);
if (!(target->is_gimped))
sendServerMessage("That player is not gimped!");
else {
sendServerMessage("Ungimped player.");
target->sendServerMessage("A moderator has ungimped you! " + getReprimand(true));
}
target->is_gimped = false;
}
QStringList AOClient::buildAreaList(int area_idx) QStringList AOClient::buildAreaList(int area_idx)
{ {
QStringList entries; QStringList entries;