Add /ungimp
This commit is contained in:
parent
23d50b9216
commit
43ce86ff12
@ -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}},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user