[Logging] Table Injection - Member Variable Cleanup (#2281)

* Logsys member variable cleanup, table injection

* Private member adjustments, OOB checks

* continue
This commit is contained in:
Chris Miles
2022-07-06 22:01:47 -05:00
committed by GitHub
parent 5c105d7408
commit eca4eed996
5 changed files with 115 additions and 55 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ void DiscordManager::ProcessMessageQueue()
for (auto &q: webhook_message_queue) {
LogDiscord("Processing [{}] messages in queue for webhook ID [{}]...", q.second.size(), q.first);
auto webhook = LogSys.discord_webhooks[q.first];
if (q.first >= MAX_DISCORD_WEBHOOK_ID) {
LogDiscord("Out of bounds webhook ID [{}] max [{}]", q.first, MAX_DISCORD_WEBHOOK_ID);
continue;
}
auto webhook = LogSys.GetDiscordWebhooks()[q.first];
std::string message;
for (auto &m: q.second) {