2017-05-30 08:29:09 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class ServerCommands : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ServerCommands();
|
|
|
|
|
2022-09-13 14:39:45 -04:00
|
|
|
using serverCommandHandler = std::function<bool(Command::Params*)>;
|
|
|
|
static void OnCommand(std::int32_t cmd, const serverCommandHandler& callback);
|
2017-05-30 08:29:09 -04:00
|
|
|
|
|
|
|
private:
|
2022-09-13 14:39:45 -04:00
|
|
|
static std::unordered_map<std::int32_t, serverCommandHandler> Commands;
|
2017-05-31 04:42:43 -04:00
|
|
|
|
2017-05-30 08:29:09 -04:00
|
|
|
static bool OnServerCommand();
|
2022-04-12 08:34:51 -04:00
|
|
|
static void CG_DeployServerCommand_Stub();
|
2017-05-30 08:29:09 -04:00
|
|
|
};
|
|
|
|
}
|