From 8bba9cde5c2536812679855e145954929a054d48 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 16 May 2011 18:26:37 +0100 Subject: Restored the auto-admin powers of the local user (via name= in the config) --HG-- extra : rebase_source : a35aa0d978990c28fa4fc158ce47d1f4aa967c04 --- src/servercommand.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/servercommand.cpp') diff --git a/src/servercommand.cpp b/src/servercommand.cpp index 215dc0d27..5bb4f67f8 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -33,11 +33,13 @@ void cmd_privs(std::wostringstream &os, { if(ctx->parms.size() == 1) { + // Show our own real privs, without any adjustments + // made for admin status os<player->privs); return; } - if((ctx->player->privs & PRIV_PRIVS) == 0) + if((ctx->privs & PRIV_PRIVS) == 0) { os<player->privs & PRIV_PRIVS) == 0) + if((ctx->privs & PRIV_PRIVS) == 0) { os<player->privs & PRIV_SETTIME) ==0) + if((ctx->privs & PRIV_SETTIME) ==0) { os<player->privs & PRIV_SERVER) ==0) + if((ctx->privs & PRIV_SERVER) ==0) { os<player->privs & PRIV_SERVER) ==0) + if((ctx->privs & PRIV_SERVER) ==0) { os<player->privs & PRIV_TELEPORT) ==0) + if((ctx->privs & PRIV_TELEPORT) ==0) { os<flags = 1; // Default, unless we change it. - u64 privs = ctx->player->privs; + u64 privs = ctx->privs; if(ctx->parms.size() == 0 || ctx->parms[0] == L"help") { -- cgit v1.2.3