diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-10 06:10:21 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-10 06:10:21 +0200 |
commit | 55a6045504bee4bf425870b6b427abd5240e7303 (patch) | |
tree | 43cb314ba77dda958c4ca45ac2e2bd2417898353 /src/Client/CommandParser.h | |
parent | c1322fb9461ad14241271251dd3551afd7fc5bc8 (diff) | |
download | mad-55a6045504bee4bf425870b6b427abd5240e7303.tar mad-55a6045504bee4bf425870b6b427abd5240e7303.zip |
Einige Verbesserungen am Kommando-Parser
Diffstat (limited to 'src/Client/CommandParser.h')
-rw-r--r-- | src/Client/CommandParser.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Client/CommandParser.h b/src/Client/CommandParser.h index 8b3cc69..891323f 100644 --- a/src/Client/CommandParser.h +++ b/src/Client/CommandParser.h @@ -39,7 +39,7 @@ namespace Client { class CommandParser { private: struct Command { - const char* command; + const char* commands[3]; const char* cmdline; const char* desc; const char* longdesc; @@ -65,9 +65,12 @@ class CommandParser { finished(); } + const Command* findCommand(const std::string& command); + void printUsage(const std::string& command); + void helpCommand(const std::vector<std::string> &args); void statusCommand(const std::vector<std::string>&); - void quitCommand(const std::vector<std::string>&); + void exitCommand(const std::vector<std::string>&); public: CommandParser(Common::RequestManager *requestManager0, Net::Connection *connection0) : requestManager(requestManager0), connection(connection0), activeRequests(0), disconnect(false) {} @@ -78,7 +81,7 @@ class CommandParser { bool parse(const std::string &cmd); void requestDisconnect() { - quitCommand(std::vector<std::string>()); + exitCommand(std::vector<std::string>()); } sigc::signal<void> signalFinished() const {return finished;} |