Merge branch 'NoEvo'

This commit is contained in:
ChocoTaco1 2020-04-04 14:38:45 -04:00
parent 3e1629b9c8
commit ec81ce6b74
6 changed files with 57 additions and 10 deletions

View file

@ -1,5 +1,7 @@
$Host::ClassicAdminLog = 1;
$Host::ClassicConnectLog = 1;
//$Host::ClassicAdminLog = 1;
//$Host::ClassicConnectLog = 1;
//$Host::ClassicVoteLog = 1;
//exec("scripts/autoexec/EnableLogs.cs");
//Enable Logs
@ -58,4 +60,23 @@ function connectLog(%client, %isDisconnect)
logEcho($ConnectLog);
echo($ConnectLog);
}
}
// voteLog(%client, %votemsg)
// Info: Logs the vote events
function voteLog(%client, %votemsg)
{
if($Host::ClassicVoteLog)
{
// get the client info
%authInfo = %client.getAuthInfo();
%ip = getField(strreplace(%client.getAddress(),":","\t"),1);
// this is the info that will be logged
$VoteLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[HH:nn]") SPC %client.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %client.guid @ ") Initiated a vote:" SPC %votemsg SPC "CM[" @ $CurrentMission @ "]";
%logpath = $Host::ClassicVoteLogPath;
export("$VoteLog", %logpath, true);
logEcho($VoteLog);
}
}