From 761d47c5378b9ce854b965118b4b3b10780709a3 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Tue, 7 Apr 2020 22:47:11 -0400 Subject: [PATCH] Changed around Show name for votekick --- Classic/scripts/autoexec/EnableLogs.cs | 10 +++++++--- Classic/scripts/autoexec/VoteMenu.cs | 9 ++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Classic/scripts/autoexec/EnableLogs.cs b/Classic/scripts/autoexec/EnableLogs.cs index b36463e..462e05f 100644 --- a/Classic/scripts/autoexec/EnableLogs.cs +++ b/Classic/scripts/autoexec/EnableLogs.cs @@ -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); diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 6562509..aeca655 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -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) {