Add a check to /judgelog to only send IPIDs to users with appropriate permissions

This commit is contained in:
MangosArentLiterature 2021-04-06 13:50:06 -05:00
parent 0aa772ea89
commit d73a7292fc

View File

@ -1288,7 +1288,14 @@ void AOClient::cmdJudgeLog(int argc, QStringList argv)
return;
}
QString message = area->judgelog.join("\n");
//Judgelog contains an IPID, so we shouldn't send that unless the caller has appropriate permissions
if (((checkAuth(ACLFlags.value("KICK"))) == 1) || (((checkAuth(ACLFlags.value("BAN"))) == 1))) {
sendServerMessage(message);
}
else {
QString filteredmessage = message.remove(QRegularExpression("[(]*[)]")); //Filter out anything between two parentheses. This should only ever be the IPID
sendServerMessage(filteredmessage);
}
}
QStringList AOClient::buildAreaList(int area_idx)