[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:
sanctum32 2013-12-29 23:05:34 +02:00 committed by Antz
parent d18fc38034
commit ab98672241
6 changed files with 16 additions and 7 deletions

View file

@ -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;