Added new config options chat channel level limit, option to disable player commands of any kind
--HG-- branch : trunk
This commit is contained in:
@@ -1066,6 +1066,9 @@ int ChatHandler::ParseCommands(const char* text)
|
||||
|
||||
std::string fullcmd = text;
|
||||
|
||||
if (this->getSession()->GetSecurity() <= SEC_PLAYER && sWorld.getConfig(CONFIG_ALLOW_PLAYER_COMMANDS) == 0)
|
||||
return 0;
|
||||
|
||||
if (m_session && !m_session->HandleOnPlayerChat(text))
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -510,6 +510,9 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
return;
|
||||
|
||||
if (_player->getLevel() < sWorld.getConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
|
||||
return;
|
||||
|
||||
if(msg.empty())
|
||||
break;
|
||||
|
||||
|
||||
@@ -604,6 +604,8 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_configs[CONFIG_COMPRESSION] = 1;
|
||||
}
|
||||
m_configs[CONFIG_ADDON_CHANNEL] = sConfig.GetBoolDefault("AddonChannel", true);
|
||||
m_configs[CONFIG_CHAT_CHANNEL_LEVEL_REQ] = sConfig.GetIntDefault("ChannelLevelReq", 1);
|
||||
m_configs[CONFIG_ALLOW_PLAYER_COMMANDS] = sConfig.GetBoolDefault("AllowPlayerCommands", 1);
|
||||
m_configs[CONFIG_GRID_UNLOAD] = sConfig.GetBoolDefault("GridUnload", true);
|
||||
m_configs[CONFIG_INTERVAL_SAVE] = sConfig.GetIntDefault("PlayerSaveInterval", 15 * MINUTE * IN_MILISECONDS);
|
||||
m_configs[CONFIG_INTERVAL_DISCONNECT_TOLERANCE] = sConfig.GetIntDefault("DisconnectToleranceInterval", 0);
|
||||
|
||||
@@ -199,6 +199,8 @@ enum WorldConfigs
|
||||
CONFIG_CHAT_FAKE_MESSAGE_PREVENTING,
|
||||
CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY,
|
||||
CONFIG_CHAT_STRICT_LINK_CHECKING_KICK,
|
||||
CONFIG_CHAT_CHANNEL_LEVEL_REQ,
|
||||
CONFIG_ALLOW_PLAYER_COMMANDS,
|
||||
CONFIG_CORPSE_DECAY_NORMAL,
|
||||
CONFIG_CORPSE_DECAY_RARE,
|
||||
CONFIG_CORPSE_DECAY_ELITE,
|
||||
|
||||
@@ -1030,6 +1030,14 @@ ListenRange.Yell = 300
|
||||
# Default: 0 (join announcement in normal way)
|
||||
# 1 (GM join without announcement)
|
||||
#
|
||||
# ChannelLevelReq
|
||||
# The required level of character to be able to write in chat channels
|
||||
# Default: 1 (From level 1)
|
||||
#
|
||||
# AllowPlayerCommands
|
||||
# Allowed the players to use commands
|
||||
# Default: 1 (allow)
|
||||
#
|
||||
###################################################################################################################
|
||||
|
||||
ChatFakeMessagePreventing = 0
|
||||
@@ -1040,6 +1048,8 @@ ChatFlood.MessageDelay = 1
|
||||
ChatFlood.MuteTime = 10
|
||||
Channel.RestrictedLfg = 1
|
||||
Channel.SilentlyGMJoin = 0
|
||||
ChannelLevelReq = 1
|
||||
AllowPlayerCommands = 1
|
||||
|
||||
###################################################################################################################
|
||||
# GAME MASTER SETTINGS
|
||||
|
||||
Reference in New Issue
Block a user