mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Cleanup] Cleanup discord.cpp and discord_manager.cpp (#3205)
# Notes - Unused variables in `discord.cpp`. - Use `.clear()` instead of setting to `""` in `discord_manager.cpp`.
This commit is contained in:
parent
c1d4cb90b9
commit
93b3f97f24
@ -27,9 +27,6 @@ void Discord::SendWebhookMessage(const std::string &message, const std::string &
|
||||
cli.set_connection_timeout(0, 15000000); // 15 sec
|
||||
cli.set_read_timeout(15, 0); // 15 seconds
|
||||
cli.set_write_timeout(15, 0); // 15 seconds
|
||||
httplib::Headers headers = {
|
||||
{"Content-Type", "application/json"}
|
||||
};
|
||||
|
||||
// payload
|
||||
Json::Value p;
|
||||
@ -96,9 +93,6 @@ void Discord::SendPlayerEventMessage(
|
||||
cli.set_connection_timeout(0, 15000000); // 15 sec
|
||||
cli.set_read_timeout(15, 0); // 15 seconds
|
||||
cli.set_write_timeout(15, 0); // 15 seconds
|
||||
httplib::Headers headers = {
|
||||
{"Content-Type", "application/json"}
|
||||
};
|
||||
|
||||
std::string payload = PlayerEventLogs::GetDiscordPayloadFromEvent(e);
|
||||
if (payload.empty()) {
|
||||
|
||||
@ -37,7 +37,7 @@ void DiscordManager::ProcessMessageQueue()
|
||||
message,
|
||||
webhook.webhook_url
|
||||
);
|
||||
message = "";
|
||||
message.clear();
|
||||
}
|
||||
|
||||
message += m;
|
||||
@ -51,7 +51,7 @@ void DiscordManager::ProcessMessageQueue()
|
||||
webhook.webhook_url
|
||||
);
|
||||
}
|
||||
message = "";
|
||||
message.clear();
|
||||
}
|
||||
}
|
||||
// final flush
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user