From b3268ff3896097abdd9199e4bb8ee826afda8388 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 16 May 2011 17:13:33 +0100 Subject: Server commands without classes --- src/servercommand.h | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'src/servercommand.h') 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 -- cgit v1.2.3