mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Merge branch 'NoEvo'
This commit is contained in:
parent
3e1629b9c8
commit
ec81ce6b74
6 changed files with 57 additions and 10 deletions
|
|
@ -72,6 +72,8 @@ $Host::ClassicTelnetPort = 666;
|
||||||
$Host::ClassicTkLimit = 0;
|
$Host::ClassicTkLimit = 0;
|
||||||
$Host::ClassicUseHighPerformanceCounter = 0;
|
$Host::ClassicUseHighPerformanceCounter = 0;
|
||||||
$Host::ClassicViralBanning = 1;
|
$Host::ClassicViralBanning = 1;
|
||||||
|
$Host::ClassicVoteLog = 1;
|
||||||
|
$Host::ClassicVoteLogPath = "logs/Vote/Vote.log";
|
||||||
$Host::ClassicWhitelist = "prefs/whitelist.cs";
|
$Host::ClassicWhitelist = "prefs/whitelist.cs";
|
||||||
$Host::CRCTextures = 0;
|
$Host::CRCTextures = 0;
|
||||||
$Host::Dedicated = 1;
|
$Host::Dedicated = 1;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
$Host::ClassicAdminLog = 1;
|
//$Host::ClassicAdminLog = 1;
|
||||||
$Host::ClassicConnectLog = 1;
|
//$Host::ClassicConnectLog = 1;
|
||||||
|
//$Host::ClassicVoteLog = 1;
|
||||||
|
|
||||||
//exec("scripts/autoexec/EnableLogs.cs");
|
//exec("scripts/autoexec/EnableLogs.cs");
|
||||||
|
|
||||||
//Enable Logs
|
//Enable Logs
|
||||||
|
|
@ -59,3 +61,22 @@ function connectLog(%client, %isDisconnect)
|
||||||
echo($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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Exploit Patches Script
|
// Memory Patches
|
||||||
|
|
||||||
// Remote Code Execution Patch by Bahke
|
// Remote Code Execution Patch by Bahke
|
||||||
memPatch("A3C300","A370C3A300E8D609A0FF8B46205053E98103A0FF");
|
memPatch("A3C300","A370C3A300E8D609A0FF8B46205053E98103A0FF");
|
||||||
|
|
@ -323,6 +323,8 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
{
|
{
|
||||||
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 = %client.nameBase @ " initiated a vote to change the time limit to " @ %time @ ".";
|
||||||
|
// VoteOvertime
|
||||||
|
StartVOTimeVote(%game);
|
||||||
}
|
}
|
||||||
|
|
||||||
case "VoteMatchStart":
|
case "VoteMatchStart":
|
||||||
|
|
@ -547,6 +549,14 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(%typeName $= "VoteChangeTimeLimit")
|
||||||
|
{
|
||||||
|
if(%arg1 $= "999")
|
||||||
|
%time = "Unlimited";
|
||||||
|
else
|
||||||
|
%time = %arg1;
|
||||||
|
}
|
||||||
|
|
||||||
%count = ClientGroup.getCount();
|
%count = ClientGroup.getCount();
|
||||||
for(%i = 0; %i < %count; %i++)
|
for(%i = 0; %i < %count; %i++)
|
||||||
{
|
{
|
||||||
|
|
@ -561,7 +571,6 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
|
||||||
case "VoteSkipMission":
|
case "VoteSkipMission":
|
||||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "skip the mission");
|
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "skip the mission");
|
||||||
case "VoteChangeTimeLimit":
|
case "VoteChangeTimeLimit":
|
||||||
if(%arg1 $= "999") %time = "Unlimited"; else %time = %arg1;
|
|
||||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the time limit to", %time);
|
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the time limit to", %time);
|
||||||
case "VoteKickPlayer":
|
case "VoteKickPlayer":
|
||||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name);
|
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name);
|
||||||
|
|
@ -605,7 +614,14 @@ 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("Vote Initiated by" SPC %client.nameBase SPC %typeName SPC %arg1 SPC %arg2 SPC %arg3 SPC %arg4);
|
echo(%msg);
|
||||||
|
|
||||||
|
// Log Vote
|
||||||
|
if($Host::ClassicVoteLog)
|
||||||
|
{
|
||||||
|
%votemsg = %typeName SPC %arg1 SPC %arg2 SPC %arg3 SPC %arg4;
|
||||||
|
voteLog(%client, %votemsg);
|
||||||
|
}
|
||||||
|
|
||||||
if($Host::EnableVoteSoundReminders > 0)
|
if($Host::EnableVoteSoundReminders > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -783,9 +799,17 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
|
||||||
{
|
{
|
||||||
messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display);
|
messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display);
|
||||||
$Host::TimeLimit = %newLimit;
|
$Host::TimeLimit = %newLimit;
|
||||||
|
// VoteOvertime
|
||||||
|
ResetVOTimeChanged(%game);
|
||||||
|
// Reset the voted time limit when changing mission
|
||||||
|
$TimeLimitChanged = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
|
// VoteOvertime
|
||||||
|
ResetVOall(%game);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the match has been started, reset the end of match countdown
|
//if the match has been started, reset the end of match countdown
|
||||||
|
|
@ -1094,7 +1118,8 @@ function DefaultGame::passRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
|
|
||||||
function DefaultGame::stopRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
function DefaultGame::stopRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
{
|
{
|
||||||
if(%admin && Game.scheduleVote !$= "")
|
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||||
|
if(%admin && Game.scheduleVote !$= "" && %curTimeLeftMS > 0)
|
||||||
{
|
{
|
||||||
stopCurrentVote();
|
stopCurrentVote();
|
||||||
messageAll('MsgAdminForce', '\c2The Admin stopped the vote.');
|
messageAll('MsgAdminForce', '\c2The Admin stopped the vote.');
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,6 @@ function DefaultGame::gameOver(%game)
|
||||||
|
|
||||||
//Reset everything to do with Vote Overtime
|
//Reset everything to do with Vote Overtime
|
||||||
ResetVOall(%game);
|
ResetVOall(%game);
|
||||||
|
|
||||||
if(isEventPending($VoteSoundSchedule))
|
|
||||||
cancel($VoteSoundSchedule);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,8 @@ $Host::ClassicViralBanning = 1;
|
||||||
$Host::ClassicWhitelist = "prefs/whitelist.cs";
|
$Host::ClassicWhitelist = "prefs/whitelist.cs";
|
||||||
$Host::ClassicSuppressTraversalRootError = 1;
|
$Host::ClassicSuppressTraversalRootError = 1;
|
||||||
$Host::ClassicMaxVotes = 5;
|
$Host::ClassicMaxVotes = 5;
|
||||||
|
$Host::ClassicVoteLog = 1;
|
||||||
|
$Host::ClassicVoteLogPath = "logs/Vote/Vote.log";
|
||||||
$Host::ServerRules1 = "\c2if\c4(\c3%client.fun == \c5true \c4&& \c3%client.Llama_Grabs \c4< \c51\c4)";
|
$Host::ServerRules1 = "\c2if\c4(\c3%client.fun == \c5true \c4&& \c3%client.Llama_Grabs \c4< \c51\c4)";
|
||||||
$Host::ServerRules2 = " \c1Be_Courteous\c4(\c2%client, %game\c4);";
|
$Host::ServerRules2 = " \c1Be_Courteous\c4(\c2%client, %game\c4);";
|
||||||
$Host::ServerRules3 = "\c2else if\c4(\c3%client.attitude \c4!$ = \c5%client.fun\c4)";
|
$Host::ServerRules3 = "\c2else if\c4(\c3%client.attitude \c4!$ = \c5%client.fun\c4)";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue