From b09d0df2173caf2d0a1b8bd4ae5d6867eeda6608 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 30 Aug 2021 11:40:33 -0400 Subject: [PATCH 1/7] Vote Menu Tweaks Moved some things around (Team Damage) Fixed double 'Force Observer' bug Allow admins to gag Dont allow admins to control NetTournyClient Toggle --- Classic/scripts/admin.cs | 6 +- Classic/scripts/autoexec/VoteMenu.cs | 94 ++++++++++++++++------------ 2 files changed, 56 insertions(+), 44 deletions(-) mode change 100644 => 100755 Classic/scripts/admin.cs diff --git a/Classic/scripts/admin.cs b/Classic/scripts/admin.cs old mode 100644 new mode 100755 index 2e65d55..401a128 --- a/Classic/scripts/admin.cs +++ b/Classic/scripts/admin.cs @@ -477,7 +477,7 @@ function serverCmdGetAntiTurtleTimeList( %client, %key ) function serverCmdTogglePlayerGag(%client, %who) { - if(%client.isSuperAdmin) + if(%client.isAdmin || %client.isSuperAdmin) { if(!%who.isGagged && !%who.isSuperAdmin) { @@ -496,8 +496,8 @@ function serverCmdTogglePlayerGag(%client, %who) logEcho(%client.nameBase @ " ungagged " @ %who.nameBase, 1); } } - else - messageClient(%client, 'MsgError', '\c2Only Super Admins can use this command.'); + // else + // messageClient(%client, 'MsgError', '\c2Only Super Admins can use this command.'); } function serverCmdTogglePlayerFreeze(%client, %who) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 45dec5e..8f9ecec 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -57,6 +57,8 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) { messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); if(%multipleTeams) { @@ -66,8 +68,6 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage'); } - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); messageClient(%client, 'MsgVoteItem',"", %key, 'ForceVote', 'Cancel Force Vote', "Cancel 'Vote To...'"); return; // Display no further vote options } @@ -137,6 +137,8 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Vote Tournament Mode'); if($Host::AllowPlayerVoteTimeLimit) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); + if($Host::AllowPlayerVoteSkipMission) + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); if(%multipleTeams && $Host::AllowPlayerVoteTeamDamage) { @@ -145,15 +147,11 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) else messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage'); } - - if($Host::AllowPlayerVoteSkipMission) - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); } else { if(!$MatchStarted && !$CountdownStarted) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Vote Free For All Mode'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); @@ -176,6 +174,14 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Skip the Mission' ); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit'); + if(%multipleTeams) + { + if($teamDamage) + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage'); + else + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage'); + } + if( $Host::AllowAdminVotes ) messageClient(%client, 'MsgVoteItem', "", %key, 'ForceVote', 'Vote to ...', 'Vote to ...'); } @@ -186,9 +192,9 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) if(!$MatchStarted && $CountdownStarted) messageClient(%client, 'MsgVoteItem', "", %key, 'cancelMatchStart', 'Cancel Match Start', 'Cancel Match Start'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Change the Mission'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Free For All Mode'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Change the Mission'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Free For All Mode'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit'); if($Host::Password !$= "") messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password'); @@ -199,21 +205,24 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleLockedTeams', 'Disable Locked Teams', 'Disable Locked Teams'); else messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleLockedTeams', 'Enable Locked Teams', 'Enable Locked Teams'); - } - if(%multipleTeams) - { - if($teamDamage) - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage'); - else - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage'); + if(%multipleTeams) + { + if($teamDamage) + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage'); + else + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage'); + } } //Toggle Tournament Net Client - if(%client.isAdmin && $Host::EnableNetTourneyClient) - messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Disable Tournament Net Client', "Disable Tournament Net Client" ); - else if(%client.isAdmin) - messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Enable Tournament Net Client', "Enable Tournament Net Client" ); + if(%client.isSuperAdmin) + { + if($Host::EnableNetTourneyClient) + messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Disable Tournament Net Client', "Disable Tournament Net Client" ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Enable Tournament Net Client', "Enable Tournament Net Client" ); + } } @@ -1223,16 +1232,16 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k messageClient( %client, 'MsgPlayerPopupItem', "", %key, "SendMessage", "", 'Send Private Message', 15 ); + if ( %targetClient.isGagged ) + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "UnGagPlayer", "", 'UnGag Player', 17); + else + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "GagPlayer", "", 'Gag Player', 17); + if( %client.isSuperAdmin ) { messageClient( %client, 'MsgPlayerPopupItem', "", %key, "PrintClientInfo", "", 'Client Info', 16 ); // z0dd - ZOD - MeBad, 7/13/03. Send client information. messageClient( %client, 'MsgPlayerPopupItem', "", %key, "BanPlayer", "", 'Ban', 4 ); - if ( %targetClient.isGagged ) - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "UnGagPlayer", "", 'UnGag Player', 17); - else - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "GagPlayer", "", 'Gag Player', 17); - if ( %targetClient.isFroze ) messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ThawPlayer", "", 'Thaw Player', 18); else @@ -1241,11 +1250,10 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k messageClient( %client, 'MsgPlayerPopupItem', "", %key, "BootPlayer", "", 'Boot to the Rear', 19); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ExplodePlayer", "", 'Explode Player', 20); } - if ( !%isTargetObserver ) - { - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ToObserver", "", 'Force observer', 5 ); - } } + + if ( !%isTargetObserver ) + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ToObserver", "", 'Force observer', 5 ); } if ( %isTargetSelf || %outrankTarget ) { @@ -1256,24 +1264,28 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k { if ( %isTargetObserver ) { - %action = %isTargetSelf ? "Join " : "Change to "; - %str1 = %action @ getTaggedString( %game.getTeamName(1) ); - %str2 = %action @ getTaggedString( %game.getTeamName(2) ); + %action = %isTargetSelf ? "Join " : "Change to "; + %str1 = %action @ getTaggedString( %game.getTeamName(1) ); + %str2 = %action @ getTaggedString( %game.getTeamName(2) ); - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str1, 6 ); - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str2, 7 ); + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str1, 6 ); + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str2, 7 ); } else if( %isSuperAdmin || ($Host::AllowAdminSwitchTeams && %isAdmin) ) { - %changeTo = %targetClient.team == 1 ? 2 : 1; - %str = "Switch to " @ getTaggedString( %game.getTeamName(%changeTo) ); - %caseId = 5 + %changeTo; + %changeTo = %targetClient.team == 1 ? 2 : 1; + %str = "Switch to " @ getTaggedString( %game.getTeamName(%changeTo) ); + %caseId = 5 + %changeTo; - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str, %caseId ); - - // z0dd - ZOD, 7/11/03. Allow Super admins to force themselves to obs. - messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ToObserver", "", 'Force observer', 5 ); + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ChangeTeam", "", %str, %caseId ); } + + // z0dd - ZOD, 7/11/03. Allow Super admins to force themselves to obs. + if( %isSuperAdmin ) + { + if(%isTargetSelf && !%isTargetObserver) + messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ToObserver", "", 'Force observer', 5 ); + } } else if ( %isTargetObserver ) { From e6b858bc1dec07843e1279503bad954b3bcd1111 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 30 Aug 2021 12:07:42 -0400 Subject: [PATCH 2/7] Fixed Logging --- Classic/scripts/admin.cs | 12 ++++++------ Classic/scripts/server.cs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Classic/scripts/admin.cs b/Classic/scripts/admin.cs index 401a128..e96e180 100755 --- a/Classic/scripts/admin.cs +++ b/Classic/scripts/admin.cs @@ -485,7 +485,7 @@ function serverCmdTogglePlayerGag(%client, %who) messageClient(%client, 'MsgAdmin', 'You have Gagged %1.', %who.name); messageAllExcept(%who, -1, 'MsgAdminForce', '%1 has been Gagged by %2 for talking too much crap.', %who.name, %client.name); messageClient(%who, 'MsgAdminAction', 'You have Been Gagged by %1, quit talking trash and play.', %client.name); - logEcho(%client.nameBase @ " gagged " @ %target.nameBase, 1); + adminLog(%client, " gagged " @ %who.nameBase); } else if (%who.isGagged) { @@ -493,7 +493,7 @@ function serverCmdTogglePlayerGag(%client, %who) messageClient(%client, 'MsgAdmin', 'You have UnGagged %1.', %who.name); messageAllExcept(%who, -1, 'MsgAdminAction', '%1 has been UnGagged by %2.', %who.name, %client.name); messageClient(%who, 'MsgAdminAction', 'You have Been UnGagged by %1, quit talking trash and play.', %client.name); - logEcho(%client.nameBase @ " ungagged " @ %who.nameBase, 1); + adminLog(%client, " ungagged " @ %who.nameBase); } } // else @@ -523,7 +523,7 @@ function serverCmdTogglePlayerFreeze(%client, %who) messageClient(%client, 'MsgAdmin', 'You have Frozen %1.', %who.name); messageAllExcept(%who, -1, 'MsgAdminForce', '%1 has been Frozen by %2 for being a Llama.', %who.name, %client.name); messageClient(%who, 'MsgAdminAction', 'You have Been Frozen by %1, Think about what you have been doing.', %client.name); - logEcho(%client.nameBase @ " froze " @ %who.nameBase, 1); + adminLog(%client, " froze " @ %who.nameBase); } else if (%who.isFroze) { @@ -533,7 +533,7 @@ function serverCmdTogglePlayerFreeze(%client, %who) messageClient(%client, 'MsgAdmin', 'You have de-iced %1.', %who.name); messageAllExcept(%who, -1, 'MsgAdminForce', '%1 has been Un Frozen by %2.', %who.name, %client.name); messageClient(%who, 'MsgAdminAction', 'You have Been de-Iced by %1, now behave.', %client.name); - logEcho(%client.nameBase @ " unfroze " @ %who.nameBase, 1); + adminLog(%client, " unfroze " @ %who.nameBase); } } else @@ -557,7 +557,7 @@ function serverCmdBootToTheRear(%client, %who) %obj.applyImpulse(%obj.position, VectorScale(%vec, %obj.getDataBlock().mass*20)); messageAllExcept(%who, -1, 'MsgAdminForce', '%1 has been given a boot to the rear by %2.', %who.name, %client.name); messageClient(%who, 'MsgAdminAction', 'You have Been given a boot to the ass by %1, now behave.', %client.name); - logEcho(%client.nameBase @ " gave " @ %who.nameBase @ " a boot to the rear", 1); + adminLog(%client, " gave " @ %who.nameBase @ " a boot to the rear"); } else { @@ -583,7 +583,7 @@ function serverCmdExplodePlayer(%client, %who) %who.player.scriptKill(0); messageAllExcept(%who, -1, 'MsgAdminForce', '%1 found some explosives in his pants planted by %2.', %who.name, %client.name); messageClient(%who, 'MsgAdminAction', 'You have Been dissasembled for inspection by the Super Admin %1, now behave.', %client.name); - logEcho(%client.nameBase @ " exploded " @ %who.nameBase, 1); + adminLog(%client, " exploded " @ %who.nameBase); } else { diff --git a/Classic/scripts/server.cs b/Classic/scripts/server.cs index 0265cae..5d38190 100755 --- a/Classic/scripts/server.cs +++ b/Classic/scripts/server.cs @@ -2602,7 +2602,7 @@ function serverCmdWarnPlayer(%client, %target) messageAllExcept(%target, -1, 'MsgAdminForce', '%1 has been warned for inappropriate conduct by %2.', %target.name, %client.name); messageClient(%target, 'MsgAdminForce', 'You are recieving this warning for inappropriate conduct by %1. Behave or you will be kicked..~wfx/misc/lightning_impact.wav', %client.name); centerprint(%target, "You are recieving this warning for inappropriate conduct.\nBehave or you will be kicked.", 10, 2); - logEcho(%client.nameBase @ " sent warning to " @ %target.nameBase); + adminLog(%client, " sent warning to " @ %target.nameBase); } else messageClient(%client, 'MsgError', '\c2Only Admins can use this command.'); From 4f919d5af9d240c5ee72ab5b4e834dd82c4c9e21 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 30 Aug 2021 12:54:34 -0400 Subject: [PATCH 3/7] Logging --- Classic/scripts/server.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classic/scripts/server.cs b/Classic/scripts/server.cs index 5d38190..113a6b4 100755 --- a/Classic/scripts/server.cs +++ b/Classic/scripts/server.cs @@ -2579,7 +2579,7 @@ function serverCmdStripAdmin(%client, %admin) %admin.isAdmin = 0; %admin.isSuperAdmin = 0; messageClient(%admin, 'MsgStripAdminPlayer', 'You have stripped yourself of admin privledges.'); - logEcho(%client.nameBase @ " stripped admin from " @ %admin.nameBase, 1); + adminLog(%client, " stripped admin from " @ %admin.nameBase); return; } else if(%client.isSuperAdmin) @@ -2588,7 +2588,7 @@ function serverCmdStripAdmin(%client, %admin) messageClient(%admin, 'MsgStripAdminPlayer', 'You are being stripped of your admin privledges by %1.', %client.name); %admin.isAdmin = 0; %admin.isSuperAdmin = 0; - logEcho(%client.nameBase @ " stripped admin from " @ %admin.nameBase, 1); + adminLog(%client, " stripped admin from " @ %admin.nameBase); } else messageClient(%client, 'MsgError', '\c2Only Super Admins can use this command.'); From 64aa8dc148978982c96f87f8159fa1daba29c71c Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 30 Aug 2021 12:55:01 -0400 Subject: [PATCH 4/7] Formatting --- Classic/scripts/autoexec/VoteMenu.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 8f9ecec..33249b8 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -152,9 +152,10 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) { if(!$MatchStarted && !$CountdownStarted) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Vote Free For All Mode'); - messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); + + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Vote Free For All Mode'); + messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); if(%multipleTeams) { @@ -1499,7 +1500,7 @@ function serverCmdClientJoinGame(%client) { if($LockedTeams) { - messageClient( %client, '', "Teams are locked. Ask the admin to set your team." ); + messageClient( %client, '', "Teams are locked. Ask an admin to set your team." ); return; } Parent::serverCmdClientJoinGame(%client); @@ -1512,7 +1513,7 @@ function serverCmdClientPickedTeam(%client, %option) { if($Host::TournamentMode && %client.team !$= 0) //Added { - messageClient( %client, '', "Teams are locked. Ask the admin to set your team." ); + messageClient( %client, '', "Teams are locked. Ask an admin to set your team." ); serverCmdClientMakeObserver( %client ); } return; @@ -1523,7 +1524,7 @@ function serverCmdClientTeamChange(%client, %option) { if($LockedTeams) { - messageClient( %client, '', "Teams are locked. Ask the admin to set your team." ); + messageClient( %client, '', "Teams are locked. Ask an admin to set your team." ); return; } Parent::serverCmdClientTeamChange(%client, %option); From 15bc9e7ae3b198f372a9381dcc7c995348f1f508 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Thu, 2 Sep 2021 19:30:50 -0400 Subject: [PATCH 5/7] Update --- Classic/prefs/MapRotation.cs | 6 +++--- Classic/prefs/serverPrefs.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Classic/prefs/MapRotation.cs b/Classic/prefs/MapRotation.cs index 56d6bcd..1cb299a 100644 --- a/Classic/prefs/MapRotation.cs +++ b/Classic/prefs/MapRotation.cs @@ -45,7 +45,7 @@ //Small Maps ///////////////////////////////////////////////////////////////////// -//addRotationMap("SmallCrossing", "CTF",1,1,-1,16); //Using Small Crossing: DMP Version +//addRotationMap("SmallCrossing", "CTF",1,1,-1,16); //Using DMP Version addRotationMap("TWL2_CanyonCrusadeDeluxe", "CTF",1,1,-1,18); addRotationMap("RoundTheMountain", "CTF",1,1,-1,18); addRotationMap("oasisintensity", "CTF",1,1,-1,12); @@ -74,8 +74,8 @@ addRotationMap("FrozenHope", "CTF",1,1,8,12); addRotationMap("ClusterUnFuct", "CTF",1,1,8,12); addRotationMap("Raspian", "CTF",1,0,8,12); addRotationMap("Zilch", "CTF",1,1,8,12); -addRotationMap("Cinerarium", "CTF",1,0,-1,12); -addRotationMap("StarFallCTF", "CTF",1,0,6,12); +//addRotationMap("Cinerarium", "CTF",1,0,-1,12); //Using DMP Version +//addRotationMap("StarFallCTF", "CTF",1,0,6,12); //Using DMP Version //Medium Maps ///////////////////////////////////////////////////////////////////// diff --git a/Classic/prefs/serverPrefs.cs b/Classic/prefs/serverPrefs.cs index da08a33..22d2ccc 100644 --- a/Classic/prefs/serverPrefs.cs +++ b/Classic/prefs/serverPrefs.cs @@ -118,7 +118,7 @@ $Host::LoadScreenColor3 = "33CCCC"; $Host::LoadScreenLine1 = "Join Discord:"; $Host::LoadScreenLine1_Msg = "playt2.com/discord"; $Host::LoadScreenLine2 = "Game Modes:"; -$Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag, Siege"; +$Host::LoadScreenLine2_Msg = "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"; $Host::LoadScreenLine3 = "Get Mappacks:"; $Host::LoadScreenLine3_Msg = "playt2.com/mappacks"; $Host::LoadScreenLine4 = "Server Provided by:"; From aea38be3b5e8e6e0094f0dc1b3d198ae9d974b2a Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 13 Sep 2021 16:38:06 -0400 Subject: [PATCH 6/7] Echos Off by default --- Classic/scripts/autoexec/z_dtStats.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classic/scripts/autoexec/z_dtStats.cs b/Classic/scripts/autoexec/z_dtStats.cs index 0b2bcc0..bb43390 100644 --- a/Classic/scripts/autoexec/z_dtStats.cs +++ b/Classic/scripts/autoexec/z_dtStats.cs @@ -84,7 +84,7 @@ $Host::ShowIngamePlayerScores = 1; //debug stuff $dtStats::enableRefresh = 0; -$dtStats::debugEchos = 1;// echos function calls +$dtStats::debugEchos = 0;// echos function calls //$dtStats::returnToMenuTimer = (303*1000); //$pref::NoClearConsole = 1; From e6af4d968bf38c90743d4fd0b4c9702eb7ec46b3 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 13 Sep 2021 17:33:21 -0400 Subject: [PATCH 7/7] TeamKill Logging --- Classic/prefs/serverPrefs.cs | 2 ++ Classic/scripts/autoexec/EnableLogs.cs | 18 ++++++++++++++++++ Classic/scripts/autoexec/TKwarn.cs | 13 ++++++++++--- Classic/scripts/serverDefaults.cs | 2 ++ 4 files changed, 32 insertions(+), 3 deletions(-) mode change 100644 => 100755 Classic/scripts/autoexec/EnableLogs.cs mode change 100644 => 100755 Classic/scripts/autoexec/TKwarn.cs diff --git a/Classic/prefs/serverPrefs.cs b/Classic/prefs/serverPrefs.cs index 22d2ccc..975d180 100644 --- a/Classic/prefs/serverPrefs.cs +++ b/Classic/prefs/serverPrefs.cs @@ -69,6 +69,8 @@ $Host::ClassicRotationFile = "prefs/mapRotation.cs"; $Host::ClassicStatsType = 2; $Host::ClassicSuperAdminPassword = "changeme"; $Host::ClassicSuppressTraversalRootError = 1; +$Host::ClassicTeamKillLog = 1; +$Host::ClassicTeamKillLogPath = "logs/TeamKills/teamkills.log"; $Host::ClassicTelnet = 1; $Host::ClassicTelnetListenPass = "changeme"; $Host::ClassicTelnetPassword = "changeme"; diff --git a/Classic/scripts/autoexec/EnableLogs.cs b/Classic/scripts/autoexec/EnableLogs.cs old mode 100644 new mode 100755 index 7853a6d..917c0b4 --- a/Classic/scripts/autoexec/EnableLogs.cs +++ b/Classic/scripts/autoexec/EnableLogs.cs @@ -153,4 +153,22 @@ function ClassicChatLog(%client, %id, %team, %msg) $ClassicChatLog = stripChars($ClassicChatLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp"); %path = $Host::ClassicChatLogPath @ formatTimeString("/yy/mm-MM/dd.log"); export("$ClassicChatLog", %path, true); +} + +// Log Teamkills +function teamkillLog(%victimID, %killerID) +{ + if(!$Host::ClassicTeamKillLog) + return; + + //echo("TK Log"); + + //Note: %killerID.teamkills + 1 as this is added later + $teamkillLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %killerID.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %killerID.guid @ ") teamkilled" SPC %victimID.nameBase SPC "and has" SPC (%killerID.teamkills + 1) SPC "tks. CM[" @ $CurrentMission @ "]"; + $teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp"); + + %logpath = $Host::ClassicTeamKillLogPath; + export("$teamkillLog", %logpath, true); + logEcho($teamkillLog); + echo($teamkillLog); } \ No newline at end of file diff --git a/Classic/scripts/autoexec/TKwarn.cs b/Classic/scripts/autoexec/TKwarn.cs old mode 100644 new mode 100755 index 5d46db9..6e2bb2d --- a/Classic/scripts/autoexec/TKwarn.cs +++ b/Classic/scripts/autoexec/TKwarn.cs @@ -3,15 +3,22 @@ package TKwarn { - // From Evo function DefaultGame::testTeamKill(%game, %victimID, %killerID) -{ +{ %tk = Parent::testTeamKill(%game, %victimID, %killerID); if(!%tk) return false; // is not a tk + + // No Bots + if(%killerID.isAIcontrolled() || %victimID.isAIcontrolled()) + return true; + + // Log TeamKill + teamkillLog(%victimID, %killerID); - if($Host::TournamentMode || %killerID.isAdmin || %killerID.isAIcontrolled() || %victimID.isAIcontrolled()) + // No Admins + if(%killerID.isAdmin) return true; // Ignore this map diff --git a/Classic/scripts/serverDefaults.cs b/Classic/scripts/serverDefaults.cs index a616891..1885902 100755 --- a/Classic/scripts/serverDefaults.cs +++ b/Classic/scripts/serverDefaults.cs @@ -203,6 +203,8 @@ $Host::KickObserverTimeout = 1200; //How long player can stay in obs $Host::dtBanlist = "prefs/dtBanlist.cs"; //Alternate Ban System $Host::VoteCooldown = 120; //Time cooldown that dosnt allow a player to vote again after theyve initiated a vote (120 is 2 mins) $Host::VoteDelayTime = 120; //Delay the ability to vote (For everyone) at the beginning of the match (120 is 2 minutes) +$Host::ClassicTeamKillLog = 1; //Enable/Disable Teamkill Logging +$Host::ClassicTeamKillLogPath = "logs/TeamKills/teamkills.log"; //TeamKill Log Path //LakRabbit $Host::LakRabbitUnlimitedDJ = 1; //Unlimited disc-jumps if enabled