diff options
author | Ciaran Gultnieks <ciaran@ciarang.com> | 2011-05-16 17:13:33 +0100 |
---|---|---|
committer | Ciaran Gultnieks <ciaran@ciarang.com> | 2011-05-16 17:13:33 +0100 |
commit | b3268ff3896097abdd9199e4bb8ee826afda8388 (patch) | |
tree | b74739545827746853abc3c7eb0a9e411f18aa97 /src/servercommand.h | |
parent | 1520d49310c07b1f8500582b6ac22baedcc80dcb (diff) | |
download | hax-minetest-server-b3268ff3896097abdd9199e4bb8ee826afda8388.tar.gz hax-minetest-server-b3268ff3896097abdd9199e4bb8ee826afda8388.zip |
Server commands without classes
Diffstat (limited to '')
-rw-r--r-- | src/servercommand.h | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/servercommand.h b/src/servercommand.h index 01efcae06..bc7823c66 100644 --- a/src/servercommand.h +++ b/src/servercommand.h @@ -47,29 +47,11 @@ struct ServerCommandContext }; -class ServerCommand -{ -public: - - static std::wstring processCommand(ServerCommandContext *ctx); - -private: - - static void cmd_status(std::wostringstream &os, - ServerCommandContext *ctx); - static void cmd_privs(std::wostringstream &os, - ServerCommandContext *ctx); - static void cmd_grantrevoke(std::wostringstream &os, - ServerCommandContext *ctx); - static void cmd_time(std::wostringstream &os, - ServerCommandContext *ctx); - static void cmd_shutdown(std::wostringstream &os, - ServerCommandContext *ctx); - static void cmd_setting(std::wostringstream &os, - ServerCommandContext *ctx); - static void cmd_teleport(std::wostringstream &os, - ServerCommandContext *ctx); -}; +// Process a command sent from a client. The environment and connection +// should be locked when this is called. +// Returns a response message, to be dealt with according to the flags set +// in the context. +std::wstring processServerCommand(ServerCommandContext *ctx); #endif |