Core/PacketIO: Implemented possibility to ban client addons serverside

This commit is contained in:
Shauren
2013-04-05 15:06:35 +02:00
parent 140614b882
commit d24ef896df
9 changed files with 127 additions and 34 deletions

View File

@@ -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