Changed around

Show name for votekick
This commit is contained in:
ChocoTaco1 2020-04-07 22:47:11 -04:00
parent 725a3b1860
commit 761d47c537
2 changed files with 9 additions and 10 deletions

View file

@ -62,18 +62,22 @@ function connectLog(%client, %isDisconnect)
}
}
// voteLog(%client, %votemsg)
// voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
// Info: Logs the vote events
function voteLog(%client, %votemsg)
function voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
{
if($Host::ClassicVoteLog)
{
// get the client info
%authInfo = %client.getAuthInfo();
%ip = getField(strreplace(%client.getAddress(),":","\t"),1);
// show name for Votekick
if(%typeName $= "VoteKickPlayer")
%arg1 = %arg1.nameBase;
// 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 @ "]";
$VoteLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[HH:nn]") SPC %client.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %client.guid @ ") Initiated a vote:" SPC %typeName SPC %arg1 SPC %arg2 SPC %arg3 SPC %arg4 SPC "CM[" @ $CurrentMission @ "]";
%logpath = $Host::ClassicVoteLogPath;
export("$VoteLog", %logpath, true);

View file

@ -614,14 +614,9 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
%client.canVote = false;
%client.rescheduleVote = schedule(($Host::voteSpread * 1000) + ($Host::voteTime * 1000) , 0, "resetVotePrivs", %client);
echo(%msg);
// Log Vote
if($Host::ClassicVoteLog)
{
%votemsg = %typeName SPC %arg1 SPC %arg2 SPC %arg3 SPC %arg4;
voteLog(%client, %votemsg);
}
voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4);
echo(%msg);
if($Host::EnableVoteSoundReminders > 0)
{