mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-04-04 19:25:04 +00:00
TeamKill Logging
This commit is contained in:
parent
aea38be3b5
commit
e6af4d968b
4 changed files with 32 additions and 3 deletions
|
|
@ -69,6 +69,8 @@ $Host::ClassicRotationFile = "prefs/mapRotation.cs";
|
|||
$Host::ClassicStatsType = 2;
|
||||
$Host::ClassicSuperAdminPassword = "changeme";
|
||||
$Host::ClassicSuppressTraversalRootError = 1;
|
||||
$Host::ClassicTeamKillLog = 1;
|
||||
$Host::ClassicTeamKillLogPath = "logs/TeamKills/teamkills.log";
|
||||
$Host::ClassicTelnet = 1;
|
||||
$Host::ClassicTelnetListenPass = "changeme";
|
||||
$Host::ClassicTelnetPassword = "changeme";
|
||||
|
|
|
|||
18
Classic/scripts/autoexec/EnableLogs.cs
Normal file → Executable file
18
Classic/scripts/autoexec/EnableLogs.cs
Normal file → Executable file
|
|
@ -153,4 +153,22 @@ function ClassicChatLog(%client, %id, %team, %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);
|
||||
}
|
||||
|
||||
// Log Teamkills
|
||||
function teamkillLog(%victimID, %killerID)
|
||||
{
|
||||
if(!$Host::ClassicTeamKillLog)
|
||||
return;
|
||||
|
||||
//echo("TK Log");
|
||||
|
||||
//Note: %killerID.teamkills + 1 as this is added later
|
||||
$teamkillLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %killerID.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %killerID.guid @ ") teamkilled" SPC %victimID.nameBase SPC "and has" SPC (%killerID.teamkills + 1) SPC "tks. CM[" @ $CurrentMission @ "]";
|
||||
$teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
||||
|
||||
%logpath = $Host::ClassicTeamKillLogPath;
|
||||
export("$teamkillLog", %logpath, true);
|
||||
logEcho($teamkillLog);
|
||||
echo($teamkillLog);
|
||||
}
|
||||
13
Classic/scripts/autoexec/TKwarn.cs
Normal file → Executable file
13
Classic/scripts/autoexec/TKwarn.cs
Normal file → Executable file
|
|
@ -3,15 +3,22 @@
|
|||
package TKwarn
|
||||
{
|
||||
|
||||
|
||||
// From Evo
|
||||
function DefaultGame::testTeamKill(%game, %victimID, %killerID)
|
||||
{
|
||||
{
|
||||
%tk = Parent::testTeamKill(%game, %victimID, %killerID);
|
||||
if(!%tk)
|
||||
return false; // is not a tk
|
||||
|
||||
// No Bots
|
||||
if(%killerID.isAIcontrolled() || %victimID.isAIcontrolled())
|
||||
return true;
|
||||
|
||||
// Log TeamKill
|
||||
teamkillLog(%victimID, %killerID);
|
||||
|
||||
if($Host::TournamentMode || %killerID.isAdmin || %killerID.isAIcontrolled() || %victimID.isAIcontrolled())
|
||||
// No Admins
|
||||
if(%killerID.isAdmin)
|
||||
return true;
|
||||
|
||||
// Ignore this map
|
||||
|
|
|
|||
|
|
@ -203,6 +203,8 @@ $Host::KickObserverTimeout = 1200; //How long player can stay in obs
|
|||
$Host::dtBanlist = "prefs/dtBanlist.cs"; //Alternate Ban System
|
||||
$Host::VoteCooldown = 120; //Time cooldown that dosnt allow a player to vote again after theyve initiated a vote (120 is 2 mins)
|
||||
$Host::VoteDelayTime = 120; //Delay the ability to vote (For everyone) at the beginning of the match (120 is 2 minutes)
|
||||
$Host::ClassicTeamKillLog = 1; //Enable/Disable Teamkill Logging
|
||||
$Host::ClassicTeamKillLogPath = "logs/TeamKills/teamkills.log"; //TeamKill Log Path
|
||||
|
||||
//LakRabbit
|
||||
$Host::LakRabbitUnlimitedDJ = 1; //Unlimited disc-jumps if enabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue