iw4x-client/src/Components/Modules/RCon.hpp

43 lines
816 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class RCon : public Component
{
public:
RCon();
private:
class Container
{
public:
int timestamp;
std::string output;
std::string command;
2017-01-19 16:23:59 -05:00
std::string challenge;
Network::Address address;
};
class CryptoKey
{
public:
static const Utils::Cryptography::ECC::Key& Get();
private:
static bool LoadKey(Utils::Cryptography::ECC::Key& key);
static Utils::Cryptography::ECC::Key GenerateKey();
static Utils::Cryptography::ECC::Key LoadOrGenerateKey();
static Utils::Cryptography::ECC::Key GetKeyInternal();
};
static Container RconContainer;
static Utils::Cryptography::ECC::Key RconKey;
2017-01-19 16:23:59 -05:00
static std::string Password;
static Dvar::Var RconPassword;
static Dvar::Var RconLogRequests;
static void AddCommands();
2017-01-19 16:23:59 -05:00
};
}