[Commands] Add #bugs Command. (#2559)

* [Commands] Add #bugs Command.

- Adds a #bugs command for viewing bug reports.
- Remove unused bug related rules in favor of hard-coding the new system.

* Cleanup.

* Typo.

* Push.

* Lower status so it fits with message.
This commit is contained in:
Kinglykrab
2022-11-22 17:32:26 -05:00
committed by GitHub
parent dd3c76e9d2
commit 52e1bc943a
11 changed files with 434 additions and 269 deletions
+5 -11
View File
@@ -3936,23 +3936,17 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app)
void Client::Handle_OP_Bug(const EQApplicationPacket *app)
{
if (!RuleB(Bugs, ReportingSystemActive)) {
Message(0, "Bug reporting is disabled on this server.");
Message(Chat::White, "Bug reporting is disabled on this server.");
return;
}
if (app->size != sizeof(BugReport_Struct)) {
printf("Wrong size of BugReport_Struct got %d expected %zu!\n", app->size, sizeof(BugReport_Struct));
}
else {
BugReport_Struct* bug_report = (BugReport_Struct*)app->pBuffer;
if (RuleB(Bugs, UseOldReportingMethod))
database.RegisterBug(bug_report);
else
database.RegisterBug(this, bug_report);
LogError("Wrong size of BugReport_Struct got {} expected {}!", app->size, sizeof(BugReport_Struct));
return;
}
return;
auto *r = (BugReport_Struct *) app->pBuffer;
RegisterBug(r);
}
void Client::Handle_OP_Camp(const EQApplicationPacket *app)