mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[12757] Chat commands disabled for normal players.
A new setting for the world server has been added. From now on
chat commands executed by normal player accounts will no longer
be executed, unless you explicitly enable the `PlayerCommands`
option.
By default player command execution is disabled.
commit is based on 208599f7fa
This commit is contained in:
parent
d18fc38034
commit
ab98672241
6 changed files with 16 additions and 7 deletions
|
|
@ -1335,12 +1335,12 @@ bool ChatHandler::ParseCommands(const char* text)
|
|||
MANGOS_ASSERT(text);
|
||||
MANGOS_ASSERT(*text);
|
||||
|
||||
// if(m_session->GetSecurity() == SEC_PLAYER)
|
||||
// return false;
|
||||
|
||||
/// chat case (.command or !command format)
|
||||
if (m_session)
|
||||
{
|
||||
if (m_session->GetSecurity() == SEC_PLAYER && !sWorld.getConfig(CONFIG_BOOL_PLAYER_COMMANDS))
|
||||
return false;
|
||||
|
||||
if (text[0] != '!' && text[0] != '.')
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue