[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
+3 -1
View File
@@ -2799,7 +2799,9 @@ void Zone::SendDiscordMessage(int webhook_id, const std::string& message)
void Zone::SendDiscordMessage(const std::string& webhook_name, const std::string &message)
{
bool not_found = true;
for (auto & w : LogSys.discord_webhooks) {
for (int i= 0; i < MAX_DISCORD_WEBHOOK_ID; i++) {
auto &w = LogSys.GetDiscordWebhooks()[i];
if (w.webhook_name == webhook_name) {
SendDiscordMessage(w.id, message + "\n");
not_found = false;