Index: src/map/map.cpp =================================================================== --- src/map/map.cpp (revision 4079) +++ src/map/map.cpp (working copy) @@ -841,6 +841,11 @@ map_config.newstyle_skillups = 7; map_config.max_merit_points = 30; map_config.audit_chat = 0; + map_config.audit_say = 0; + map_config.audit_shout = 0; + map_config.audit_tell = 0; + map_config.audit_yell = 0; + map_config.audit_linkshell = 0; return 0; } @@ -1026,6 +1031,30 @@ { map_config.audit_chat = atoi(w2); } + else if (strcmp(w1,"audit_say") == 0) + { + map_config.audit_say = atoi(w2); + } + else if (strcmp(w1,"audit_shout") == 0) + { + map_config.audit_shout = atoi(w2); + } + else if (strcmp(w1,"audit_tell") == 0) + { + map_config.audit_tell = atoi(w2); + } + else if (strcmp(w1,"audit_yell") == 0) + { + map_config.audit_yell = atoi(w2); + } + else if (strcmp(w1,"audit_linkshell") == 0) + { + map_config.audit_linkshell = atoi(w2); + } + else if (strcmp(w1,"audit_party") == 0) + { + map_config.audit_party = atoi(w2); + } else { ShowWarning(CL_YELLOW"Unknown setting '%s' in file %s\n" CL_RESET, w1, cfgName); Index: src/map/map.h =================================================================== --- src/map/map.h (revision 4079) +++ src/map/map.h (working copy) @@ -90,6 +90,12 @@ uint8 newstyle_skillups; // Allows failed parries and blocks to trigger skill up chance. uint8 max_merit_points; // global variable, amount of merit points players are allowed bool audit_chat; + bool audit_say; + bool audit_shout; + bool audit_tell; + bool audit_yell; + bool audit_linkshell; + bool audit_party; }; /************************************************************************ Index: src/map/packet_system.cpp =================================================================== --- src/map/packet_system.cpp (revision 4079) +++ src/map/packet_system.cpp (working copy) @@ -3236,6 +3236,8 @@ { if (map_config.audit_chat == 1) { + if(map_config.audit_say == 1) + { std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','SAY','"; @@ -3243,6 +3245,8 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + + } } PChar->loc.zone->PushPacket(PChar, CHAR_INRANGE, new CChatMessagePacket(PChar, MESSAGE_SAY, data+6)); } @@ -3252,6 +3256,9 @@ { if (map_config.audit_chat == 1) { + if(map_config.audit_shout == 1) + { + std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','SHOUT','"; @@ -3259,6 +3266,8 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + + } } PChar->loc.zone->PushPacket(PChar, CHAR_INSHOUT, new CChatMessagePacket(PChar, MESSAGE_SHOUT, data+6)); @@ -3270,6 +3279,8 @@ { if (map_config.audit_chat == 1) { + if (map_config.audit_linkshell == 1) + { std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','LINKSHELL','"; @@ -3277,6 +3288,7 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + } } PChar->PLinkshell->PushPacket(PChar, new CChatMessagePacket(PChar, MESSAGE_LINKSHELL, data+6)); } @@ -3290,6 +3302,9 @@ { if (map_config.audit_chat == 1) { + if (map_config.audit_party == 1) + { + std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','PARTY','"; @@ -3297,6 +3312,8 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + + } } PChar->PParty->PushPacket(PChar, 0, new CChatMessagePacket(PChar, MESSAGE_PARTY, data+6)); @@ -3307,6 +3324,9 @@ } if (map_config.audit_chat == 1) { + if(map_config.audit_party == 1) + { + std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','ALLIANCE','"; @@ -3314,6 +3334,8 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + + } } } } @@ -3323,6 +3345,9 @@ { if (map_config.audit_chat == 1) { + if (map_config.audit_yell == 1) + { + std::string qStr = ("INSERT into audit_chat (speaker,type,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','YELL','"; @@ -3330,6 +3355,8 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + + } } PChar->pushPacket(new CMessageStandardPacket(PChar, 0, 256)); }break; @@ -3396,6 +3423,9 @@ } if (map_config.audit_chat == 1) { + if(map_config.audit_tell == 1) + { + std::string qStr = ("INSERT into audit_chat (speaker,type,recipient,message,datetime) VALUES('"); qStr +=PChar->GetName(); qStr +="','TELL','"; @@ -3405,6 +3435,8 @@ qStr +="',current_timestamp());"; const char * cC = qStr.c_str(); Sql_QueryStr(SqlHandle, cC); + + } } PTellRecipient->pushPacket(new CChatMessagePacket(PChar, MESSAGE_TELL, data+20)); return;