1234567891011121314151617181920212223 |
- #ifndef COMMANDMANAGER_H
- #define COMMANDMANAGER_H
- #include <unordered_map>
- #include <vector>
- #include "server/commands/ICommandSource.h"
- class CommandManager
- {
- public:
- CommandManager();
-
- void execute(IGameServer& gs, ICommandSource& cs, const std::string& rawCommand) const;
- private:
- std::unordered_map<std::string, void (*) (IGameServer& gs, ICommandSource&, const std::vector<std::string>&)> commands;
-
- void registerCommand(const std::string& name, void (*command) (IGameServer& gs, ICommandSource&, const std::vector<std::string>&));
- };
- #endif
|