]> git.localhorst.tv Git - blank.git/blobdiff - src/shared/CLI.hpp
impersonate command
[blank.git] / src / shared / CLI.hpp
index b601e572d554af0ffa8cd1e274e4c0f3541388b8..b0731e8a4ce69d0ffd5b40abd643fe4c50fbd29c 100644 (file)
@@ -7,7 +7,7 @@
 
 namespace blank {
 
-class Player;
+class CLIContext;
 class TokenStreamReader;
 class World;
 
@@ -16,7 +16,7 @@ class CLI {
 public:
        struct Command {
                virtual ~Command();
-               virtual void Execute(CLI &, Player &, TokenStreamReader &) = 0;
+               virtual void Execute(CLI &, CLIContext &, TokenStreamReader &) = 0;
        };
 
 public:
@@ -25,10 +25,9 @@ public:
 
        void AddCommand(const std::string &name, Command *);
 
-       void Execute(Player &, const std::string &);
+       void Execute(CLIContext &, const std::string &);
 
-       void Message(const std::string &msg);
-       void Error(const std::string &msg);
+       World &GetWorld() noexcept { return world; }
 
 private:
        World &world;