diff options
author | XTZGZoReX <none@none> | 2009-03-25 14:25:15 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2009-03-25 14:25:15 +0100 |
commit | 82e966e5f2862f30e1a661c4fe2e09f5525c4a96 (patch) | |
tree | c394ead852cb20d4a3753fa5323de16a32090836 /src/game/Player.cpp | |
parent | 833eaa9ed38e822e4704738fe583aebcbbaa6df6 (diff) |
* Added support for logging chats: Guild, raid, party, public, officer chat, addon messages, whispers, system/custom channels.
* Added config options to enable/disable them (ChatLogs.*), LogDB.Chat (enables/disables DB logging of chats), and ChatLogFile to specify the log file to use.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index bef57fd0a45..85d03fc2fd1 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17071,6 +17071,10 @@ void Player::Say(const std::string& text, const uint32 language) WorldPacket data(SMSG_MESSAGECHAT, 200); BuildPlayerChat(&data, CHAT_MSG_SAY, text, language); SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),true); + + if(sWorld.getConfig(CONFIG_CHATLOG_PUBLIC)) + sLog.outChat("[SAY] Player %s says (language %u): %s", + GetName(), language, text.c_str()); } void Player::Yell(const std::string& text, const uint32 language) @@ -17078,6 +17082,10 @@ void Player::Yell(const std::string& text, const uint32 language) WorldPacket data(SMSG_MESSAGECHAT, 200); BuildPlayerChat(&data, CHAT_MSG_YELL, text, language); SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),true); + + if(sWorld.getConfig(CONFIG_CHATLOG_PUBLIC)) + sLog.outChat("[YELL] Player %s yells (language %u): %s", + GetName(), language, text.c_str()); } void Player::TextEmote(const std::string& text) @@ -17085,6 +17093,10 @@ void Player::TextEmote(const std::string& text) WorldPacket data(SMSG_MESSAGECHAT, 200); BuildPlayerChat(&data, CHAT_MSG_EMOTE, text, LANG_UNIVERSAL); SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),true, !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT), true ); + + if(sWorld.getConfig(CONFIG_CHATLOG_PUBLIC)) + sLog.outChat("[TEXTEMOTE] Player %s emotes: %s", + GetName(), text.c_str()); } void Player::Whisper(const std::string& text, uint32 language,uint64 receiver) @@ -17094,6 +17106,10 @@ void Player::Whisper(const std::string& text, uint32 language,uint64 receiver) Player *rPlayer = objmgr.GetPlayer(receiver); + if(sWorld.getConfig(CONFIG_CHATLOG_WHISPER)) + sLog.outChat("[WHISPER] Player %s tells %s: %s", + GetName(), rPlayer->GetName(), text.c_str()); + // when player you are whispering to is dnd, he cannot receive your message, unless you are in gm mode if(!rPlayer->isDND() || isGameMaster()) { |