mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-22 03:18:22 +00:00
normalize includes: common
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
#include <cereal/archives/json.hpp>
|
||||
#include <cereal/archives/binary.hpp>
|
||||
#include "discord.h"
|
||||
#include "../http/httplib.h"
|
||||
#include "../json/json.h"
|
||||
#include "../strings.h"
|
||||
#include "../eqemu_logsys.h"
|
||||
#include "../events/player_event_logs.h"
|
||||
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/events/player_event_logs.h"
|
||||
#include "common/http/httplib.h"
|
||||
#include "common/json/json.h"
|
||||
#include "common/strings.h"
|
||||
|
||||
#include "cereal/archives/binary.hpp"
|
||||
#include "cereal/archives/json.hpp"
|
||||
|
||||
constexpr int MAX_RETRIES = 10;
|
||||
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
#ifndef EQEMU_DISCORD_H
|
||||
#define EQEMU_DISCORD_H
|
||||
#pragma once
|
||||
|
||||
#include "common/events/player_events.h"
|
||||
#include "common/repositories/player_event_logs_repository.h"
|
||||
#include "common/types.h"
|
||||
|
||||
#include <string>
|
||||
#include "../types.h"
|
||||
#include "../repositories/player_event_logs_repository.h"
|
||||
#include "../events/player_events.h"
|
||||
|
||||
class Discord {
|
||||
class Discord
|
||||
{
|
||||
public:
|
||||
static void SendWebhookMessage(const std::string& message, const std::string& webhook_url);
|
||||
static std::string FormatDiscordMessage(uint16 category_id, const std::string& message);
|
||||
static void SendPlayerEventMessage(const PlayerEvent::PlayerEventContainer& e, const std::string &webhook_url);
|
||||
static bool ValidateWebhookUrl(const std::string &webhook_url);
|
||||
};
|
||||
|
||||
|
||||
#endif //EQEMU_DISCORD_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "discord_manager.h"
|
||||
#include "../../common/discord/discord.h"
|
||||
#include "../events/player_event_logs.h"
|
||||
|
||||
#include "common/discord/discord.h"
|
||||
#include "common/events/player_event_logs.h"
|
||||
|
||||
void DiscordManager::QueueWebhookMessage(uint32 webhook_id, const std::string &message)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#ifndef EQEMU_DISCORD_MANAGER_H
|
||||
#define EQEMU_DISCORD_MANAGER_H
|
||||
|
||||
#include <mutex>
|
||||
#pragma once
|
||||
|
||||
#include "common/events/player_events.h"
|
||||
#include "common/repositories/player_event_logs_repository.h"
|
||||
#include "common/types.h"
|
||||
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include "../../common/types.h"
|
||||
#include "../repositories/player_event_logs_repository.h"
|
||||
#include "../events/player_events.h"
|
||||
|
||||
class DiscordManager {
|
||||
class DiscordManager
|
||||
{
|
||||
public:
|
||||
void QueueWebhookMessage(uint32 webhook_id, const std::string& message);
|
||||
void ProcessMessageQueue();
|
||||
@@ -23,6 +25,3 @@ private:
|
||||
std::mutex webhook_queue_lock{};
|
||||
std::map<uint32, std::vector<std::string>> webhook_message_queue{};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user