diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/auth.cpp | 6 | ||||
-rw-r--r-- | src/servercommand.cpp | 21 |
2 files changed, 7 insertions, 20 deletions
diff --git a/src/auth.cpp b/src/auth.cpp index fce521e13..cafeb38d4 100644 --- a/src/auth.cpp +++ b/src/auth.cpp @@ -36,6 +36,8 @@ std::set<std::string> privsToSet(u64 privs) s.insert("settime"); if(privs & PRIV_PRIVS) s.insert("privs"); + if(privs & PRIV_SERVER) + s.insert("server"); if(privs & PRIV_SHOUT) s.insert("shout"); if(privs & PRIV_BAN) @@ -60,6 +62,8 @@ std::string privsToString(u64 privs) os<<"settime,"; if(privs & PRIV_PRIVS) os<<"privs,"; + if(privs & PRIV_SERVER) + os<<"server,"; if(privs & PRIV_SHOUT) os<<"shout,"; if(privs & PRIV_BAN) @@ -98,6 +102,8 @@ u64 stringToPrivs(std::string str) privs |= PRIV_SETTIME; else if(s == "privs") privs |= PRIV_PRIVS; + else if(s == "server") + privs |= PRIV_SERVER; else if(s == "shout") privs |= PRIV_SHOUT; else if(s == "ban") diff --git a/src/servercommand.cpp b/src/servercommand.cpp index c5b242b2e..48ada56fe 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -376,26 +376,7 @@ std::wstring processServerCommand(ServerCommandContext *ctx) std::wostringstream os(std::ios_base::binary); ctx->flags = SEND_TO_SENDER; // Default, unless we change it. - u64 privs = ctx->privs; - - if(ctx->parms.size() == 0 || ctx->parms[0] == L"help") - { - os<<L"-!- Available commands: "; - os<<L"me status privs"; - if(privs & PRIV_SERVER) - os<<L" shutdown setting clearobjects"; - if(privs & PRIV_SETTIME) - os<<L" time"; - if(privs & PRIV_TELEPORT) - os<<L" teleport"; - if(privs & PRIV_PRIVS) - os<<L" grant revoke"; - if(privs & PRIV_BAN) - os<<L" ban unban"; - if(privs & PRIV_PASSWORD) - os<<L" setpassword clearpassword"; - } - else if(ctx->parms[0] == L"status") + if(ctx->parms[0] == L"status") cmd_status(os, ctx); else if(ctx->parms[0] == L"privs") cmd_privs(os, ctx); |