3 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
4 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef SERVERCOMMAND_HEADER
22 #define SERVERCOMMAND_HEADER
26 #include "common_irrlicht.h"
30 struct ServerCommandContext
33 std::vector<std::wstring> parms;
35 ServerEnvironment *env;
37 // Effective privs for the player, which may be different to their
38 // stored ones - e.g. if they are named in the config as an admin.
43 std::vector<std::wstring> parms,
45 ServerEnvironment *env,
48 : parms(parms), server(server), env(env), player(player), privs(privs)
54 // Process a command sent from a client. The environment and connection
55 // should be locked when this is called.
56 // Returns a response message, to be dealt with according to the flags set
58 std::wstring processServerCommand(ServerCommandContext *ctx);