From 07d000cc54c26001f9f79e5c0d45c2d3c4f614eb Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 16 Oct 2011 20:03:43 +0300 Subject: When granting or revoking privileges, notify the target player too --- src/servercommand.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/servercommand.cpp') diff --git a/src/servercommand.cpp b/src/servercommand.cpp index 98777adcc..3c0e6d510 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -97,15 +97,29 @@ void cmd_grantrevoke(std::wostringstream &os, u64 privs = ctx->server->getPlayerAuthPrivs(playername); if(ctx->parms[0] == L"grant"){ + privs |= newprivs; actionstream<player->getName()<<" grants " <parms[2])<<" to " <player->getName()); + msg += L" granted you the privilege \""; + msg += ctx->parms[2]; + msg += L"\""; + ctx->server->notifyPlayer(playername.c_str(), msg); } else { + privs &= ~newprivs; actionstream<player->getName()<<" revokes " <parms[2])<<" from " <player->getName()); + msg += L" revoked from you the privilege \""; + msg += ctx->parms[2]; + msg += L"\""; + ctx->server->notifyPlayer(playername.c_str(), msg); } ctx->server->setPlayerAuthPrivs(playername, privs); -- cgit v1.2.3