diff options
| author | Spp <none@none> | 2010-08-24 19:09:41 +0200 |
|---|---|---|
| committer | Spp <none@none> | 2010-08-24 19:09:41 +0200 |
| commit | 89d87339d57b932f81bbddf8a57542d8cc3074fc (patch) | |
| tree | 72dff8698d124b9bc71038410c3ae0d3c093857f /src/server/game/Chat | |
| parent | 119e05781047ab9d0b7629a3d89c9b67cd78056c (diff) | |
Core: Update Player Limit and Player Security Level variables
- Allowed Security Level will be set at server load or with 'server plimit reset' command (before it was read each time someone tried to join)
- If Security Level is updated to a more restrictive value all people under that level will be autokicked
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Chat')
| -rw-r--r-- | src/server/game/Chat/Commands/Level3.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 954d806d050..c1e46896d77 100644 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -6228,19 +6228,18 @@ bool ChatHandler::HandleServerPLimitCommand(const char *args) else if (strncmp(param,"administrator",l) == 0) sWorld.SetPlayerSecurityLimit(SEC_ADMINISTRATOR); else if (strncmp(param,"reset",l) == 0) - sWorld.SetPlayerLimit(sConfig.GetIntDefault("PlayerLimit", 100)); + { + sWorld.SetPlayerAmountLimit(sConfig.GetIntDefault("PlayerLimit", 100)); + sWorld.LoadDBAllowedSecurityLevel(); + } else { int val = atoi(param); if (val < 0) sWorld.SetPlayerSecurityLimit(AccountTypes(uint32(-val))); else - sWorld.SetPlayerLimit(val); + sWorld.SetPlayerAmountLimit(uint32(val)); } - - // kick all low security level players - if (sWorld.GetPlayerSecurityLimit() > SEC_PLAYER) - sWorld.KickAllLess(sWorld.GetPlayerSecurityLimit()); } uint32 pLimit = sWorld.GetPlayerAmountLimit(); |
