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

Restored the auto-admin powers of the local user (via name= in the config)

--HG--
extra : rebase_source : a35aa0d978990c28fa4fc158ce47d1f4aa967c04
This commit is contained in:
Ciaran Gultnieks 2011-05-16 18:26:37 +01:00
parent bc59c18503
commit 8bba9cde5c
3 changed files with 23 additions and 11 deletions

View file

@ -2870,12 +2870,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
message = message.substr(commandprefix.size());
// Local player gets all privileges regardless of
// what's set on their account.
u64 privs = player->privs;
if(g_settings.get("name") == player->getName())
privs = PRIV_ALL;
ServerCommandContext *ctx = new ServerCommandContext(
str_split(message, L' '),
this,
&m_env,
player
);
player,
privs);
line += processServerCommand(ctx);
send_to_sender = ctx->flags & 1;