This commit is contained in:
ChocoTaco1 2020-08-12 21:00:09 -04:00
parent 30ef1564ef
commit 1ddb3579a6

View file

@ -184,7 +184,9 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
// Show smurf names correctly // Show smurf names correctly
if(%client.isSmurf) if(%client.isSmurf)
%client.nameBase = stripChars( detag( getTaggedString( %client.name ) ), "\cp\co\c6\c7\c8\c9" ); %votername = stripChars( detag( getTaggedString( %client.name ) ), "\cp\co\c6\c7\c8\c9" );
else
%votername = %client.nameBase;
%teamSpecific = 0; %teamSpecific = 0;
switch$(%typeName) switch$(%typeName)
@ -221,7 +223,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
return; return;
} }
%msg = %client.nameBase @ " initiated a vote to kick player " @ %arg1.nameBase @ "."; %msg = %votername @ " initiated a vote to kick player " @ %arg1.nameBase @ ".";
messageAdmins("", "\c5[A]\c1"@ %msg @"~wgui/objective_notification.wav"); messageAdmins("", "\c5[A]\c1"@ %msg @"~wgui/objective_notification.wav");
$CMHasVoted[%client.guid]++; $CMHasVoted[%client.guid]++;
} }
@ -249,7 +251,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
if(!$host::allowadminplayervotes) // admin player votes are NOT enabled if(!$host::allowadminplayervotes) // admin player votes are NOT enabled
return; // can't do that pal return; // can't do that pal
%msg = %client.nameBase @ " initiated a vote to admin player " @ %arg1.nameBase @ "."; %msg = %votername @ " initiated a vote to admin player " @ %arg1.nameBase @ ".";
} }
case "BanPlayer": case "BanPlayer":
@ -275,14 +277,14 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
return; return;
} }
%msg = %client.nameBase @ " initiated a vote to change the mission to " @ %arg1 @ " (" @ %arg2 @ ")."; %msg = %votername @ " initiated a vote to change the mission to " @ %arg1 @ " (" @ %arg2 @ ").";
$CMHasVoted[%client.guid]++; $CMHasVoted[%client.guid]++;
} }
case "VoteTeamDamage": case "VoteTeamDamage":
if(!%isAdmin) if(!%isAdmin)
{ {
%msg = %client.nameBase @ " initiated a vote to " @ ($TeamDamage == 0 ? "enable" : "disable") @ " team damage."; %msg = %votername @ " initiated a vote to " @ ($TeamDamage == 0 ? "enable" : "disable") @ " team damage.";
} }
case "VoteTournamentMode": case "VoteTournamentMode":
@ -294,13 +296,13 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
return; return;
} }
%msg = %client.nameBase @ " initiated a vote to switch the server to Tournament Mode (" @ %arg1 @ ")."; %msg = %votername @ " initiated a vote to switch the server to Tournament Mode (" @ %arg1 @ ").";
} }
case "VoteFFAMode": case "VoteFFAMode":
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
{ {
%msg = %client.nameBase @ " initiated a vote to switch the server to Free For All mode."; %msg = %votername @ " initiated a vote to switch the server to Free For All mode.";
} }
case "VoteChangeTimeLimit": case "VoteChangeTimeLimit":
@ -346,7 +348,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote)) if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote))
{ {
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1; if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
%msg = %client.nameBase @ " initiated a vote to change the time limit to " @ %time @ "."; %msg = %votername @ " initiated a vote to change the time limit to " @ %time @ ".";
// VoteOvertime // VoteOvertime
StartVOTimeVote(%game); StartVOTimeVote(%game);
$CMHasVoted[%client.guid]++; $CMHasVoted[%client.guid]++;
@ -358,7 +360,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
if($MatchStarted || $CountdownStarted) if($MatchStarted || $CountdownStarted)
return; return;
%msg = %client.nameBase @ " initiated a vote to start the match."; %msg = %votername @ " initiated a vote to start the match.";
} }
case "CancelMatchStart": case "CancelMatchStart":
@ -373,25 +375,25 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.greedMode == 0 ? "enable" : "disable") @ " greed mode."; %msg = %votername @ " initiated a vote to " @ (Game.greedMode == 0 ? "enable" : "disable") @ " greed mode.";
case "VoteHoardMode": case "VoteHoardMode":
if($CurrentMissionType !$= "Hunters" || $CurrentMissionType !$= "TeamHunters") if($CurrentMissionType !$= "Hunters" || $CurrentMissionType !$= "TeamHunters")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.hoardMode == 0 ? "enable" : "disable") @ " hoard mode."; %msg = %votername @ " initiated a vote to " @ (Game.hoardMode == 0 ? "enable" : "disable") @ " hoard mode.";
case "VoteRandomTeams": case "VoteRandomTeams":
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
{ {
%msg = %client.nameBase @ " initiated a vote to " @ ($RandomTeams == 0 ? "enable" : "disable") @ " random teams."; %msg = %votername @ " initiated a vote to " @ ($RandomTeams == 0 ? "enable" : "disable") @ " random teams.";
} }
case "VoteFairTeams": case "VoteFairTeams":
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
{ {
%msg = %client.nameBase @ " initiated a vote to " @ ($FairTeams == 0 ? "enable" : "disable") @ " fair teams."; %msg = %votername @ " initiated a vote to " @ ($FairTeams == 0 ? "enable" : "disable") @ " fair teams.";
} }
case "VoteSkipMission": case "VoteSkipMission":
@ -403,7 +405,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
return; return;
} }
%msg = %client.nameBase @ " initiated a vote to skip the current mission."; %msg = %votername @ " initiated a vote to skip the current mission.";
$CMHasVoted[%client.guid]++; $CMHasVoted[%client.guid]++;
} }
@ -427,35 +429,35 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.duelMode == 0 ? "enable" : "disable") @ " duel mode."; %msg = %votername @ " initiated a vote to " @ (Game.duelMode == 0 ? "enable" : "disable") @ " duel mode.";
case "VoteSplashDamage": case "VoteSplashDamage":
if(!$CurrentMissionType $= "LakRabbit") if(!$CurrentMissionType $= "LakRabbit")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.noSplashDamage == 0 ? "enable" : "disable") @ " splash damage."; %msg = %votername @ " initiated a vote to " @ (Game.noSplashDamage == 0 ? "enable" : "disable") @ " splash damage.";
case "VotePro": case "VotePro":
if(!$CurrentMissionType $= "LakRabbit") if(!$CurrentMissionType $= "LakRabbit")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.pubPro == 0 ? "enable" : "disable") @ " pro mode."; %msg = %votername @ " initiated a vote to " @ (Game.pubPro == 0 ? "enable" : "disable") @ " pro mode.";
case "DMSLOnlyMode": case "DMSLOnlyMode":
if(!$CurrentMissionType $= "DM") if(!$CurrentMissionType $= "DM")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.DMSLOnlyMode == 0 ? "enable" : "disable") @ " shocklance only mode."; %msg = %votername @ " initiated a vote to " @ (Game.DMSLOnlyMode == 0 ? "enable" : "disable") @ " shocklance only mode.";
case "SCtFProMode": case "SCtFProMode":
if(!$CurrentMissionType $= "sctf") if(!$CurrentMissionType $= "sctf")
return; return;
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.SCtFProMode == 0 ? "enable" : "disable") @ " pro mode."; %msg = %votername @ " initiated a vote to " @ (Game.SCtFProMode == 0 ? "enable" : "disable") @ " pro mode.";
case "showServerRules": case "showServerRules":
if (($Host::ServerRules[1] !$= "") && (!%client.CantView)) if (($Host::ServerRules[1] !$= "") && (!%client.CantView))