mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
* Implement logging of battleground chats.
* New config option: ChatLogs.BattleGround. --HG-- branch : trunk
This commit is contained in:
@@ -436,6 +436,10 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||
WorldPacket data;
|
||||
ChatHandler::FillMessageData(&data, this, CHAT_MSG_BATTLEGROUND, lang, "", 0, msg.c_str(),NULL);
|
||||
group->BroadcastPacket(&data, false);
|
||||
|
||||
if(sWorld.getConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog.outChat("[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
|
||||
GetPlayer()->GetName(), group->GetLeaderName(), msg.c_str());
|
||||
} break;
|
||||
|
||||
case CHAT_MSG_BATTLEGROUND_LEADER:
|
||||
@@ -458,6 +462,10 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||
WorldPacket data;
|
||||
ChatHandler::FillMessageData(&data, this, CHAT_MSG_BATTLEGROUND_LEADER, lang, "", 0, msg.c_str(),NULL);
|
||||
group->BroadcastPacket(&data, false);
|
||||
|
||||
if(sWorld.getConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog.outChat("[RAID] Leader player %s tells battleground: %s",
|
||||
GetPlayer()->GetName(), msg.c_str());
|
||||
} break;
|
||||
|
||||
case CHAT_MSG_CHANNEL:
|
||||
|
||||
@@ -835,7 +835,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_configs[CONFIG_LOGDB_CLEARINTERVAL] = sConfig.GetIntDefault("LogDB.Opt.ClearInterval", 10);
|
||||
if(int32(m_configs[CONFIG_LOGDB_CLEARINTERVAL]) <= 0)
|
||||
{
|
||||
sLog.outError("LogDB.Opt.ClearInternval (%i) must be > 0, set to default 10.", m_configs[CONFIG_LOGDB_CLEARINTERVAL]);
|
||||
sLog.outError("LogDB.Opt.ClearInterval (%i) must be > 0, set to default 10.", m_configs[CONFIG_LOGDB_CLEARINTERVAL]);
|
||||
m_configs[CONFIG_LOGDB_CLEARINTERVAL] = 10;
|
||||
}
|
||||
if(reload)
|
||||
@@ -1111,6 +1111,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_configs[CONFIG_CHATLOG_GUILD] = sConfig.GetBoolDefault("ChatLogs.Guild", false);
|
||||
m_configs[CONFIG_CHATLOG_PUBLIC] = sConfig.GetBoolDefault("ChatLogs.Public", false);
|
||||
m_configs[CONFIG_CHATLOG_ADDON] = sConfig.GetBoolDefault("ChatLogs.Addon", false);
|
||||
m_configs[CONFIG_CHATLOG_BGROUND] = sConfig.GetBoolDefault("ChatLogs.BattleGround", false);
|
||||
}
|
||||
|
||||
/// Initialize the World
|
||||
|
||||
@@ -225,6 +225,7 @@ enum WorldConfigs
|
||||
CONFIG_CHATLOG_GUILD,
|
||||
CONFIG_CHATLOG_PUBLIC,
|
||||
CONFIG_CHATLOG_ADDON,
|
||||
CONFIG_CHATLOG_BGROUND,
|
||||
CONFIG_LOGDB_CLEARINTERVAL,
|
||||
CONFIG_LOGDB_CLEARTIME,
|
||||
CONFIG_VALUE_COUNT
|
||||
|
||||
@@ -381,6 +381,11 @@ AddonChannel = 1
|
||||
# Default: 0 - off
|
||||
# 1 - on
|
||||
#
|
||||
# ChatLogs.BattleGround
|
||||
# Enable logging battleground chats.
|
||||
# Default: 0 - off
|
||||
# 1 - on
|
||||
#
|
||||
###################################################################################################################
|
||||
|
||||
LogSQL = 1
|
||||
@@ -411,14 +416,15 @@ LogDB.GM = 0
|
||||
LogDB.RA = 0
|
||||
LogDB.World = 0
|
||||
LogDB.Chat = 0
|
||||
ChatLogs.Channel = 0
|
||||
ChatLogs.SysChan = 0
|
||||
ChatLogs.Whisper = 0
|
||||
ChatLogs.Party = 0
|
||||
ChatLogs.Raid = 0
|
||||
ChatLogs.Guild = 0
|
||||
ChatLogs.Public = 0
|
||||
ChatLogs.Addon = 0
|
||||
ChatLogs.Channel = 0
|
||||
ChatLogs.SysChan = 0
|
||||
ChatLogs.Whisper = 0
|
||||
ChatLogs.Party = 0
|
||||
ChatLogs.Raid = 0
|
||||
ChatLogs.Guild = 0
|
||||
ChatLogs.Public = 0
|
||||
ChatLogs.Addon = 0
|
||||
ChatLogs.BattleGround = 0
|
||||
|
||||
###################################################################################################################
|
||||
# SERVER SETTINGS
|
||||
|
||||
Reference in New Issue
Block a user