1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Server commands without classes

This commit is contained in:
Ciaran Gultnieks 2011-05-16 17:13:33 +01:00
parent 1520d49310
commit b3268ff389
3 changed files with 157 additions and 177 deletions

View file

@ -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