From 11f0a1f9d1daddf0558cd9227e3e8c9313779fc6 Mon Sep 17 00:00:00 2001 From: vstumpf Date: Fri, 13 Jan 2017 21:18:07 -0800 Subject: [PATCH] Clan Chat logging is now available --- conf/log_athena.conf | 5 +++-- sql-files/logs.sql | 4 ++-- sql-files/upgrades/upgrade_20170113_log.sql | 2 ++ src/map/log.c | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 sql-files/upgrades/upgrade_20170113_log.sql diff --git a/conf/log_athena.conf b/conf/log_athena.conf index 3983c49c29..b16e5820d3 100644 --- a/conf/log_athena.conf +++ b/conf/log_athena.conf @@ -103,7 +103,7 @@ log_commands: yes // Log NPC 'logmes' commands (Note 1) log_npc: yes -// Log CHAT (Global, Whisper, Party, Guild, Main chat) (Note 3) +// Log CHAT (Global, Whisper, Party, Guild, Main chat, Clan) (Note 3) // LOGGING FILTERS // ============================================================= // 0 = Don't log at all @@ -112,10 +112,11 @@ log_npc: yes // 4 - Log Party messages // 8 - Log Guild messages // 16 - Log Main chat messages +// 32 - Log Clan messages // Example: // log_chat: 5 = logs both Whisper & Party messages // log_chat: 8 = logs only Guild messages -// log_chat: 31 = logs everything +// log_chat: 63 = logs everything log_chat: 0 // Disable chat logging when WoE is running? (Note 1) diff --git a/sql-files/logs.sql b/sql-files/logs.sql index e035611a76..cb0197aca8 100644 --- a/sql-files/logs.sql +++ b/sql-files/logs.sql @@ -51,12 +51,12 @@ CREATE TABLE IF NOT EXISTS `cashlog` ( -- Table structure for table `chatlog` -- # ChatLog types -# Gl(O)bal # (W)hisper # (P)arty # (G)uild # (M)ain chat +# Gl(O)bal # (W)hisper # (P)arty # (G)uild # (M)ain chat # (C)lan CREATE TABLE IF NOT EXISTS `chatlog` ( `id` bigint(20) NOT NULL auto_increment, `time` datetime NOT NULL default '0000-00-00 00:00:00', - `type` enum('O','W','P','G','M') NOT NULL default 'O', + `type` enum('O','W','P','G','M','C') NOT NULL default 'O', `type_id` int(11) NOT NULL default '0', `src_charid` int(11) NOT NULL default '0', `src_accountid` int(11) NOT NULL default '0', diff --git a/sql-files/upgrades/upgrade_20170113_log.sql b/sql-files/upgrades/upgrade_20170113_log.sql new file mode 100644 index 0000000000..32234fa102 --- /dev/null +++ b/sql-files/upgrades/upgrade_20170113_log.sql @@ -0,0 +1,2 @@ +ALTER TABLE `chatlog` + CHANGE COLUMN `type` `type` ENUM('O','W','P','G','M','C') NOT NULL DEFAULT 'O'; diff --git a/src/map/log.c b/src/map/log.c index b0f86189f7..b8f3e794ca 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -99,6 +99,7 @@ static char log_chattype2char(e_log_chat_type type) case LOG_CHAT_PARTY: return 'P'; // (P)arty case LOG_CHAT_GUILD: return 'G'; // (G)uild case LOG_CHAT_MAINCHAT: return 'M'; // (M)ain chat + case LOG_CHAT_CLAN: return 'C'; // (C)lan } // should not get here, fallback