2017-05-30 08:29:09 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class ServerCommands : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ServerCommands();
|
|
|
|
~ServerCommands();
|
|
|
|
|
2017-06-04 08:21:02 -04:00
|
|
|
static void OnCommand(std::int32_t cmd, Utils::Slot<bool(Command::Params*)> cb);
|
2017-05-30 08:29:09 -04:00
|
|
|
|
|
|
|
private:
|
2017-06-04 08:21:02 -04:00
|
|
|
static std::unordered_map<std::int32_t, Utils::Slot<bool(Command::Params*)>> Commands;
|
2017-05-31 04:42:43 -04:00
|
|
|
|
2017-05-30 08:29:09 -04:00
|
|
|
static bool OnServerCommand();
|
|
|
|
static void OnServerCommandStub();
|
|
|
|
};
|
|
|
|
}
|