2017-05-30 08:29:09 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class ServerCommands : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ServerCommands();
|
|
|
|
~ServerCommands();
|
|
|
|
|
|
|
|
static void OnCommand(std::int32_t cmd, std::function<bool(Command::Params*)> cb);
|
|
|
|
|
|
|
|
private:
|
2017-05-31 04:42:43 -04:00
|
|
|
static std::unordered_map<std::int32_t, std::function<bool(Command::Params*)>> Commands;
|
|
|
|
static std::uint32_t LastServerCommand;
|
|
|
|
|
2017-05-30 08:29:09 -04:00
|
|
|
static bool OnServerCommand();
|
|
|
|
static void OnServerCommandStub();
|
2017-05-30 09:37:50 -04:00
|
|
|
static void OnServerCommandPreFailStub();
|
|
|
|
static void OnServerCommandFailPrint(int type, const char * trash, ...);
|
|
|
|
static void OnServerCommandFailPrintStub();
|
2017-05-30 08:29:09 -04:00
|
|
|
};
|
|
|
|
}
|