summaryrefslogtreecommitdiff
path: root/src/servercommand.h
diff options
context:
space:
mode:
authorCiaran Gultnieks <ciaran@ciarang.com>2011-05-16 17:13:33 +0100
committerCiaran Gultnieks <ciaran@ciarang.com>2011-05-16 17:13:33 +0100
commitb3268ff3896097abdd9199e4bb8ee826afda8388 (patch)
treeb74739545827746853abc3c7eb0a9e411f18aa97 /src/servercommand.h
parent1520d49310c07b1f8500582b6ac22baedcc80dcb (diff)
downloadminetest-b3268ff3896097abdd9199e4bb8ee826afda8388.tar.gz
minetest-b3268ff3896097abdd9199e4bb8ee826afda8388.tar.bz2
minetest-b3268ff3896097abdd9199e4bb8ee826afda8388.zip
Server commands without classes
Diffstat (limited to 'src/servercommand.h')
-rw-r--r--src/servercommand.h28
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