Merge pull request #91 from AttorneyOnline/banids2
Expose ban ids to /bans and BD
This commit is contained in:
commit
a0919d8824
@ -179,6 +179,7 @@ void AOClient::cmdBans(int argc, QStringList argv)
|
|||||||
banned_until = "The heat death of the universe";
|
banned_until = "The heat death of the universe";
|
||||||
else
|
else
|
||||||
banned_until = QDateTime::fromSecsSinceEpoch(ban.time).addSecs(ban.duration).toString("dd.MM.yyyy, hh:mm");
|
banned_until = QDateTime::fromSecsSinceEpoch(ban.time).addSecs(ban.duration).toString("dd.MM.yyyy, hh:mm");
|
||||||
|
recent_bans << "Ban ID: " + QString::number(server->db_manager->getBanID(ban.ipid));
|
||||||
recent_bans << "Affected IPID: " + ban.ipid;
|
recent_bans << "Affected IPID: " + ban.ipid;
|
||||||
recent_bans << "Affected HDID: " + ban.hdid;
|
recent_bans << "Affected HDID: " + ban.hdid;
|
||||||
recent_bans << "Reason for ban: " + ban.reason;
|
recent_bans << "Reason for ban: " + ban.reason;
|
||||||
|
@ -28,7 +28,7 @@ void AOClient::pktHardwareId(AreaData* area, int argc, QStringList argv, AOPacke
|
|||||||
{
|
{
|
||||||
hwid = argv[0];
|
hwid = argv[0];
|
||||||
if(server->db_manager->isHDIDBanned(hwid)) {
|
if(server->db_manager->isHDIDBanned(hwid)) {
|
||||||
sendPacket("BD", {server->db_manager->getBanReason(hwid)});
|
sendPacket("BD", {server->db_manager->getBanReason(hwid) + "\nBan ID: " + QString::number(server->db_manager->getBanID(hwid))});
|
||||||
socket->close();
|
socket->close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user