Update EnableLogs.cs

This commit is contained in:
ChocoTaco1 2020-04-16 22:29:22 -04:00
parent 1c7d35a009
commit 65793827c7
2 changed files with 11 additions and 7 deletions

View file

@ -94,15 +94,22 @@ function ClassicChatLog(%client, %id, %team, %msg)
return;
// Don't log voicepack stuff.
if(strstr(%msg, "~w") != -1)
if(strstr(%msg, "~w") != -1 || strstr(%msg, "flag") != -1)
return;
%team = getTaggedString(Game.getTeamName(%team));
if(%team $= "Unassigned")
%team = "Observer";
else if($CurrentMissionType $= "LakRabbit" || $CurrentMissionType $= "DM")
%team = $dtStats::gtNameLong[%client.lgame]; //from zDarktigerStats.cs
switch$(%id)
{
case 0:
%team = "[Global]";
case 1:
%team = "["@getTaggedString(Game.getTeamName(%team))@"]";
%team = "[" @ %team @ "]";
case 2:
%team = "[Admin]";
case 3:
@ -111,10 +118,7 @@ function ClassicChatLog(%client, %id, %team, %msg)
%team = "[Centerprint]";
}
// Make it all uppercase
%team = strupr(%team);
$ClassicChatLog = "["@formattimestring("H:nn:ss")@"]" SPC %team SPC getTaggedString(%client.name) @": "@%msg;
$ClassicChatLog = "["@formattimestring("H:nn:ss")@"] "@%team SPC getTaggedString(%client.name)@": "@%msg;
$ClassicChatLog = stripChars($ClassicChatLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
%path = $Host::ClassicChatLogPath @ formatTimeString("/yy/mm-MM/dd.log");
export("$ClassicChatLog", %path, true);

View file

@ -235,7 +235,7 @@ $dtStats::gtNameShort["DMGame"] = "DM";
$dtStats::gtNameShort["SCtFGame"] = "LCTF";
$dtStats::gtNameShort["ArenaGame"] = "Arena";
$dtStats::gtNameShort["DuelGame"] = "Duel";
//Display name
//Display name - rely on these in tacoserver enablelogs.cs
$dtStats::gtNameLong["CTFGame"] = "Capture the Flag";
$dtStats::gtNameLong["LakRabbitGame"] = "LakRabbit";
$dtStats::gtNameLong["DMGame"] = "Deathmatch";