Переглянути джерело

Clan Chat logging is now available

vstumpf 8 роки тому
батько
коміт
11f0a1f9d1

+ 3 - 2
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)

+ 2 - 2
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',

+ 2 - 0
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';

+ 1 - 0
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