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 // Info: Logs the vote events
function voteLog(%client, %votemsg) function voteLog(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
{ {
if($Host::ClassicVoteLog) if($Host::ClassicVoteLog)
{ {
// get the client info // get the client info
%authInfo = %client.getAuthInfo(); %authInfo = %client.getAuthInfo();
%ip = getField(strreplace(%client.getAddress(),":","\t"),1); %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 // 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; %logpath = $Host::ClassicVoteLogPath;
export("$VoteLog", %logpath, true); export("$VoteLog", %logpath, true);

View file

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