From 7ae4f95e126b47a817ef0ecb6e77f397f605192c Mon Sep 17 00:00:00 2001 From: in1tiate Date: Sun, 18 Apr 2021 18:49:06 -0500 Subject: [PATCH] expose ban ids to /bans and BD --- src/commands/moderation.cpp | 1 + src/packets.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/moderation.cpp b/src/commands/moderation.cpp index 6e3b99c..8f57472 100644 --- a/src/commands/moderation.cpp +++ b/src/commands/moderation.cpp @@ -179,6 +179,7 @@ void AOClient::cmdBans(int argc, QStringList argv) banned_until = "The heat death of the universe"; else 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 HDID: " + ban.hdid; recent_bans << "Reason for ban: " + ban.reason; diff --git a/src/packets.cpp b/src/packets.cpp index 5ffede7..284ccc9 100644 --- a/src/packets.cpp +++ b/src/packets.cpp @@ -28,7 +28,7 @@ void AOClient::pktHardwareId(AreaData* area, int argc, QStringList argv, AOPacke { hwid = argv[0]; 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(); return; }