From 60f727be8c19c858ecb5a161b89dd5c1e995e071 Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Thu, 9 Jul 2020 23:32:09 -0500 Subject: [PATCH 1/9] *rglqol plugin updated to not spam chat --- addons/sourcemod/scripting/rglqol.sp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/addons/sourcemod/scripting/rglqol.sp b/addons/sourcemod/scripting/rglqol.sp index 70133fd..e10bd86 100644 --- a/addons/sourcemod/scripting/rglqol.sp +++ b/addons/sourcemod/scripting/rglqol.sp @@ -78,19 +78,6 @@ public OnMapStart() ServerCommand("sm plugins unload waitforstv"); } -public OnClientPostAdminCheck(client) -{ - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); -} - -public Action prWelcomeClient(Handle timer, int userid) -{ - int client = GetClientOfUserId(userid); - if (client) - { - PrintColoredChat(client, "\x07FFA07A[RGLQoL]\x01 This server is running RGL QoL version \x07FFA07A%s\x01", PLUGIN_VERSION); - } -} public Action EventRoundStart(Handle event, const char[] name, bool dontBroadcast) { @@ -120,6 +107,7 @@ public Action checkStuff(Handle timer) if (StrContains(cfgVal, "rgl") != -1) { CfgExecuted = true; + CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); } else { @@ -180,7 +168,7 @@ public OnSTVChanged(ConVar convar, char[] oldValue, char[] newValue) if (StringToInt(newValue) == 1) { LogMessage("[RGLQoL] tv_enable changed to 1! Changing level in 30 seconds unless manual map change occurs before then."); - change30(); + change15(); } else if (StringToInt(newValue) == 0) { @@ -252,16 +240,16 @@ public void InvokePureCommandCheck(any ignored) if (StrContains(pureOut, "changelevel") != -1) { LogMessage("[RGLQoL] sv_pure cvar changed! Changing level in 30 seconds unless manual map change occurs before then."); - change30(); + change15(); } } -public change30() +public change15() { if (!alreadyChanging) { g_hWarnServ = CreateTimer(5.0, WarnServ, TIMER_FLAG_NO_MAPCHANGE); - g_hForceChange = CreateTimer(30.0, ForceChange, TIMER_FLAG_NO_MAPCHANGE); + g_hForceChange = CreateTimer(15.0, ForceChange, TIMER_FLAG_NO_MAPCHANGE); alreadyChanging = true; } } From 1f85576128029431539e908c833002b3d5590fe0 Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Thu, 9 Jul 2020 23:33:44 -0500 Subject: [PATCH 2/9] *updated rgl_off to not mess with other leagues configs --- cfg/rgl_off.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/rgl_off.cfg b/cfg/rgl_off.cfg index bae4c88..bc08a25 100644 --- a/cfg/rgl_off.cfg +++ b/cfg/rgl_off.cfg @@ -184,7 +184,7 @@ mp_maxrounds "0" // unsets maxrounds sv_password "" // defaults server password. overwritten by password in server.cfg, if you have one set tv_password "" // defaults stv password - +sm plugins unload rglqol // unloads the qol plugin so that it does not interfer with any other config. exec "server.cfg" // execs the settings in your server.cfg servercfgfile "server.cfg" // execs your server cfg file on map change From d3087378b7eeae80653af45643d0df94d723b02d Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Thu, 9 Jul 2020 23:55:47 -0500 Subject: [PATCH 3/9] *moved the shoutouts in the code to the thankyou.md *also reworded some comments to be more professional --- addons/sourcemod/scripting/rglqol.sp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/sourcemod/scripting/rglqol.sp b/addons/sourcemod/scripting/rglqol.sp index e10bd86..c5c5f18 100644 --- a/addons/sourcemod/scripting/rglqol.sp +++ b/addons/sourcemod/scripting/rglqol.sp @@ -55,8 +55,7 @@ public OnPluginStart() PrintColoredChatAll("\x07FFA07A[RGLQoL]\x01 version \x07FFA07A%s\x01 has been \x073EFF3Eloaded\x01.", PLUGIN_VERSION); // hooks round start events HookEvent("teamplay_round_start", EventRoundStart); - // shoutouts to lange, originally borrowed this from soap_tournament.smx here: https://github.com/Lange/SOAP-TF2DM/blob/master/addons/sourcemod/scripting/soap_tournament.sp#L48 - + // Win conditions met (maxrounds, timelimit) HookEvent("teamplay_game_over", GameOverEvent); // Win conditions met (windifference) @@ -89,7 +88,7 @@ public Action EventRoundStart(Handle event, const char[] name, bool dontBroadcas // checks stuff for restarting server public Action checkStuff(Handle timer) { - // we could use tv_enable value here but it wouldn't be accurate if stv hasn't joined yet + // using tv_enable value here would be inaccurate if stv hasn't joined yet char tvStatusOut[512]; ServerCommandEx(tvStatusOut, sizeof(tvStatusOut), "tv_status"); if (StrContains(tvStatusOut, "SourceTV not active") != -1) @@ -113,7 +112,7 @@ public Action checkStuff(Handle timer) { CfgExecuted = false; } - // if the server isnt empty, don't restart! Duh + // if the server isnt empty, don't restart! if (curplayers > 0) { LogMessage("[RGLQoL] At least 1 player on server. Not restarting."); @@ -131,7 +130,7 @@ public Action checkStuff(Handle timer) LogMessage("[RGLQoL] STV is currently live! Not restarting."); return; } - // ok. if we got this far, restart the server + // restarts the server if it is empty else { LogMessage("[RGLQoL] Server empty. Issuing sv_shutdown."); @@ -179,7 +178,6 @@ public OnSTVChanged(ConVar convar, char[] oldValue, char[] newValue) public OnServerCfgChanged(ConVar convar, char[] oldValue, char[] newValue) { // if cfg changes, then update tv_maxclients to 5 - // closes https://github.com/stephanieLGBT/rgl-server-resources/issues/14 if (GetConVarInt(FindConVar("tv_maxclients")) == 128) { SetConVarInt(FindConVar("tv_maxclients"), 5); @@ -223,7 +221,7 @@ public SetDefaultWhitelist() } } -// pure checking code below provided by nosoop ("top kekkeroni#4449" on discord) thank you i love you +// pure checking code public Action OnPure(int client, const char[] command, int argc) { if (argc > 0) From 24a813a1fd4eb74a60f6daad8cf3e4c4f804e0f0 Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Fri, 10 Jul 2020 00:46:14 -0500 Subject: [PATCH 4/9] *created a thank you file --- ThankYou.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ThankYou.md diff --git a/ThankYou.md b/ThankYou.md new file mode 100644 index 0000000..088ab83 --- /dev/null +++ b/ThankYou.md @@ -0,0 +1,21 @@ +Steph for maintaining and updating the first iteration of the plugin, in addition to creating the configs + +Aad for making the plugin + +Mastercomms for helping me out with net settings + +Arie from serveme for letting me run some things by him for the configs + +JarateKing for adding a .gitattributes file and fixing typos and grammar because I suck with github and english + +Sigafoo for running RGL + +F2 for making the original pause plugin, and others + +Miggy for being a cool anticheat admin who inspired me to make the configs in the first place + +shoutouts to lange, originally borrowed this from soap_tournament.smx here: https://github.com/Lange/SOAP-TF2DM/blob/master/addons/sourcemod/scripting/soap_tournament.sp#L48 + +nosoop for the pure checking code + +Thanks to plenty of other people for helping me with miscellaneous other stuff \ No newline at end of file From 1794aebe076f66ac749fefbb47ab9ef62e0e06e5 Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Fri, 10 Jul 2020 01:01:12 -0500 Subject: [PATCH 5/9] * updated qol and rglupdater to not spam chat * fixed issue 14 * --- addons/sourcemod/scripting/rglqol.sp | 1 - addons/sourcemod/scripting/rglupdater.sp | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/rglqol.sp b/addons/sourcemod/scripting/rglqol.sp index c5c5f18..b4a483f 100644 --- a/addons/sourcemod/scripting/rglqol.sp +++ b/addons/sourcemod/scripting/rglqol.sp @@ -106,7 +106,6 @@ public Action checkStuff(Handle timer) if (StrContains(cfgVal, "rgl") != -1) { CfgExecuted = true; - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); } else { diff --git a/addons/sourcemod/scripting/rglupdater.sp b/addons/sourcemod/scripting/rglupdater.sp index 0014350..4991afc 100644 --- a/addons/sourcemod/scripting/rglupdater.sp +++ b/addons/sourcemod/scripting/rglupdater.sp @@ -62,7 +62,12 @@ public OnRGLBetaChanged(ConVar convar, char[] oldValue, char[] newValue) public OnClientPostAdminCheck(client) { - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); + GetConVarString(FindConVar("servercfgfile"), cfgVal, sizeof(cfgVal)); + if (StrContains(cfgVal, "rgl") != -1) + { + CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); + } + } public Action prWelcomeClient(Handle timer, int userid) From a9b8c8b4740dbd06bf52d2e6bcca01fd74e05f61 Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Fri, 10 Jul 2020 01:11:43 -0500 Subject: [PATCH 6/9] * updated qol and rglupdater to not spam chat * fixed issue 14 * --- addons/sourcemod/scripting/rglqol.sp | 1 - addons/sourcemod/scripting/rglupdater.sp | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/rglqol.sp b/addons/sourcemod/scripting/rglqol.sp index c5c5f18..b4a483f 100644 --- a/addons/sourcemod/scripting/rglqol.sp +++ b/addons/sourcemod/scripting/rglqol.sp @@ -106,7 +106,6 @@ public Action checkStuff(Handle timer) if (StrContains(cfgVal, "rgl") != -1) { CfgExecuted = true; - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); } else { diff --git a/addons/sourcemod/scripting/rglupdater.sp b/addons/sourcemod/scripting/rglupdater.sp index 0014350..a93df24 100644 --- a/addons/sourcemod/scripting/rglupdater.sp +++ b/addons/sourcemod/scripting/rglupdater.sp @@ -62,7 +62,13 @@ public OnRGLBetaChanged(ConVar convar, char[] oldValue, char[] newValue) public OnClientPostAdminCheck(client) { - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); + char cfgVal[128]; + GetConVarString(FindConVar("servercfgfile"), cfgVal, sizeof(cfgVal)); + if (StrContains(cfgVal, "rgl") != -1) + { + CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); + } + } public Action prWelcomeClient(Handle timer, int userid) From 1630dadff2cbf8b6a166ec1f535fefe0986c13ec Mon Sep 17 00:00:00 2001 From: BlazeSand Date: Fri, 10 Jul 2020 01:41:18 -0500 Subject: [PATCH 7/9] updated whitespace --- addons/sourcemod/scripting/rglupdater.sp | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/sourcemod/scripting/rglupdater.sp b/addons/sourcemod/scripting/rglupdater.sp index e18e780..a93df24 100644 --- a/addons/sourcemod/scripting/rglupdater.sp +++ b/addons/sourcemod/scripting/rglupdater.sp @@ -62,10 +62,7 @@ public OnRGLBetaChanged(ConVar convar, char[] oldValue, char[] newValue) public OnClientPostAdminCheck(client) { -<<<<<<< HEAD char cfgVal[128]; -======= ->>>>>>> 1794aebe076f66ac749fefbb47ab9ef62e0e06e5 GetConVarString(FindConVar("servercfgfile"), cfgVal, sizeof(cfgVal)); if (StrContains(cfgVal, "rgl") != -1) { From 0f08a0da5020dd886fa21e237858b8e8ef2772bf Mon Sep 17 00:00:00 2001 From: steph Date: Fri, 17 Jul 2020 20:59:37 -0400 Subject: [PATCH 8/9] add tv_deltacache also fix whitespace --- cfg/rgl_base.cfg | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cfg/rgl_base.cfg b/cfg/rgl_base.cfg index 2aaf08d..6017ba7 100644 --- a/cfg/rgl_base.cfg +++ b/cfg/rgl_base.cfg @@ -8,16 +8,16 @@ sm_updater 2 // sets updater to download onl sm_updater_check // autoupdates to prevent tampering with non custom cfgs // TF2 Comp Fixes -sm_deterministic_fall_damage 1 -sm_fix_ghost_crossbow_bolts 1 -sm_fix_slope_bug 1 -sm_fix_sticky_delay 1 -sm_gunboats_always_apply 0 -sm_projectiles_ignore_teammates 0 -sm_remove_halloween_souls 1 -sm_remove_medic_attach_speed 0 -sm_remove_pipe_spin 0 -sm_rest_in_peace_rick_may 128 +sm_deterministic_fall_damage 1 +sm_fix_ghost_crossbow_bolts 1 +sm_fix_slope_bug 1 +sm_fix_sticky_delay 1 +sm_gunboats_always_apply 0 +sm_projectiles_ignore_teammates 0 +sm_remove_halloween_souls 1 +sm_remove_medic_attach_speed 0 +sm_remove_pipe_spin 0 +sm_rest_in_peace_rick_may 128 sm_winger_jump_bonus_when_fully_deployed 0 con_timestamp "1" // timestamps console log @@ -114,6 +114,7 @@ tv_maxrate "0" // sets STV maxrate to unlimite tv_msg "" // turns off any previously set tv_msg stuff tv_relayvoice "0" // turns off voice in STV tv_snapshotrate "66" // broadcasts 66 STV snapshots per second +tv_deltacache "0" // forces full ticks to be sent to stv as opposed to delta ticks tv_timeout "10" // sets STV timeout to 10 seconds tv_transmitall "1" // transmits all entity data from STV, not just visible entities // ^ THIS DOES NOT REPLACE SOURCETV+, which can be found here: https://github.com/dalegaard/srctvplus From 1b6538c0866190ee55b00e51ab2e397690a01a67 Mon Sep 17 00:00:00 2001 From: l-Aad-l <7024626+l-Aad-l@users.noreply.github.com> Date: Sat, 18 Jul 2020 16:00:21 -0400 Subject: [PATCH 9/9] load rglqol on base exec --- cfg/rgl_base.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/cfg/rgl_base.cfg b/cfg/rgl_base.cfg index 6017ba7..edc406a 100644 --- a/cfg/rgl_base.cfg +++ b/cfg/rgl_base.cfg @@ -3,6 +3,7 @@ // Created May 11, 2019 -- Updated May 22, 2020 // DO NOT EXEC THIS MANUALLY +sm plugins load rglqol // loads the qol plugin in RGL configs sm plugins reload updater // reloads updater to prevent issues where it refuses to update on changelevel sm_updater 2 // sets updater to download only plugins/cfgs sm_updater_check // autoupdates to prevent tampering with non custom cfgs