mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +01:00
Core/PacketIO: Implemented possibility to ban client addons serverside
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
struct AddonInfo
|
||||
{
|
||||
@@ -37,7 +38,7 @@ struct AddonInfo
|
||||
|
||||
struct SavedAddon
|
||||
{
|
||||
SavedAddon(const std::string& name, uint32 crc) : Name(name)
|
||||
SavedAddon(std::string const& name, uint32 crc) : Name(name)
|
||||
{
|
||||
CRC = crc;
|
||||
}
|
||||
@@ -46,13 +47,24 @@ struct SavedAddon
|
||||
uint32 CRC;
|
||||
};
|
||||
|
||||
#define STANDARD_ADDON_CRC 0x4c1c776d
|
||||
struct BannedAddon
|
||||
{
|
||||
uint32 Id;
|
||||
uint8 NameMD5[16];
|
||||
uint8 VersionMD5[16];
|
||||
uint32 Timestamp;
|
||||
};
|
||||
|
||||
#define STANDARD_ADDON_CRC 0x4C1C776D
|
||||
|
||||
namespace AddonMgr
|
||||
{
|
||||
void LoadFromDB();
|
||||
void SaveAddon(AddonInfo const& addon);
|
||||
SavedAddon const* GetAddonInfo(const std::string& name);
|
||||
|
||||
typedef std::list<BannedAddon> BannedAddonList;
|
||||
BannedAddonList const* GetBannedAddons();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user