Skip to content

Commit

Permalink
feat(*): add stac plugin (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc authored Nov 13, 2022
1 parent 9f2d0dc commit 78300e2
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,24 @@ ARG CONNECTOR_PLUGIN_URL=https://github.com/tf2pickup-org/connector/releases/dow
ARG TEAMS_PLUGIN_FILE_NAME=teams.smx
ARG TEAMS_PLUGIN_URL=https://github.com/tf2pickup-org/stadium-sm-plugin/raw/master/${TEAMS_PLUGIN_FILE_NAME}

ARG STAC_PLUGIN_VERSION=v5.4.2
ARG STAC_PLUGIN_FILE_NAME=stac.zip
ARG STAC_PLUGIN_URL=https://github.com/sapphonie/StAC-tf2/releases/download/${STAC_PLUGIN_VERSION}/${STAC_PLUGIN_FILE_NAME}

RUN \
# download all the plugins
wget -nv "${CONNECTOR_PLUGIN_URL}" "${TEAMS_PLUGIN_URL}" \
wget -nv "${CONNECTOR_PLUGIN_URL}" "${TEAMS_PLUGIN_URL}" "${STAC_PLUGIN_URL}" \
&& wget -nv "${SYSTEM2_URL}" -O "${SYSTEM2_FILE_NAME}" \
# verify checksums
&& md5sum -c checksum.md5 \
# install plugins
&& unzip -q "${SYSTEM2_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/" \
&& mv "${CONNECTOR_PLUGIN_FILE_NAME}" "$SERVER_DIR/tf/addons/sourcemod/plugins/${CONNECTOR_PLUGIN_FILE_NAME}" \
&& mv "${TEAMS_PLUGIN_FILE_NAME}" "$SERVER_DIR/tf/addons/sourcemod/plugins/${TEAMS_PLUGIN_FILE_NAME}" \
&& unzip -q -o "${STAC_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/" \
# cleanup
&& rm "${SYSTEM2_FILE_NAME}" \
&& rm "${STAC_PLUGIN_FILE_NAME}" \
&& rm "checksum.md5" \
# DM is conflicting with the ready up mode
&& rm "${SERVER_DIR}/tf/addons/sourcemod/plugins/soap_tf2dm.smx" \
Expand All @@ -39,3 +45,4 @@ ENV TF2PICKUPORG_OVERRIDE_INTERNAL_ADDRESS=
ENV TF2PICKUPORG_OVERRIDE_PUBLIC_ADDRESS=

COPY server.cfg.template ${SERVER_DIR}/tf/cfg/server.cfg.template
COPY stac.cfg ${SERVER_DIR}/tf/cfg/sourcemod/stac.cfg
1 change: 1 addition & 0 deletions checksum.md5
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
4017dfcc0ab75e3194361ed1b6200d87 connector.smx
ec22c11fdab033ecac5e31af203ba1b7 system2.zip
de11c6eb3c4a4ea147665e53c211ad08 teams.smx
6a44216ee60a3f257ea595390e8638d8 stac.zip
182 changes: 182 additions & 0 deletions stac.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
// [StAC] enable/disable plugin (setting this to 0 immediately unloads stac)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_enabled "1"

// [StAC] enable/disable showing verbose info about players' cvars and other similar info in admin console
// (recommended 0 unless you want spam in console)
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_verbose_info "0"

// [StAC] ban duration that StAC will use upon banning cheating clients. 0 = permanent.
// -
// Default: "0"
// Minimum: "0.000000"
stac_ban_duration "0"

// [StAC] maximum allowed time in seconds before client is autokicked for using turn binds (+right/+left inputs). -1 to disable autokicking, 0 instakicks
// (recommended -1.0 unless you're using this in a competitive setting)
// -
// Default: "-1.000000"
// Minimum: "-1.000000"
stac_max_allowed_turn_secs "-1.000000"

// [StAC] ban clients for non angle based cheats, aka cheat locked cvars, netprops, invalid names, invalid chat characters, etc.
// (defaults to 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_ban_for_misccheats "0"

// [StAC] optimize cvars related to patching backtracking, mostly patching doubletap, limiting fakelag, patching any possible tele expoits, etc.
// (defaults to 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"

//proph: Needs to 0 to not be potentially gameplay-altering. Also it kicks players rcon executing
//etf2l configs due to net_chan_limit_msec begin set to 75.
stac_optimize_cvars "0"

// [StAC] maximum aimsnap detections before banning a client.
// -1 to disable even checking angles (saves cpu), 0 to print to admins/stv but never ban
// (recommended 20 or higher)
// -
// Default: "20"
// Minimum: "-1.000000"
stac_max_aimsnap_detections "0"

// [StAC] maximum silent aim/norecoil detections before banning a client.
// -1 to disable even checking angles (saves cpu), 0 to print to admins/stv but never ban
// (recommended 15 or higher)
// -
// Default: "10"
// Minimum: "-1.000000"
stac_max_psilent_detections "0"

// [StAC] maximum consecutive bhop detections on a client before they get "antibhopped". client will get banned on this value + 2, so for default cvar settings, client will get banned on 12 tick perfect bhops.
// ctrl + f for "antibhop" in stac.sp for more detailed info.
// -1 to disable even checking bhops (saves cpu), 0 to print to admins/stv but never ban
// (recommended 10 or higher)
// -
// Default: "10"
// Minimum: "-1.000000"
stac_max_bhop_detections "0"

// [StAC] maximum fake angle / wrong / OOB angle detections before banning a client.
// -1 to disable even checking angles (saves cpu), 0 to print to admins/stv but never ban
// (recommended 10)
// -
// Default: "10"
// Minimum: "-1.000000"
stac_max_fakeang_detections "0"

// [StAC] maximum cmdnum spikes a client can have before getting banned. lmaobox does this with nospread on certain weapons, other cheats utilize it for other stuff, like sequence breaking on nullcore etc. legit users should never ever trigger this!
// (recommended 25)
// -
// Default: "20"
// Minimum: "-1.000000"
stac_max_cmdnum_detections "0"

// [StAC] maximum triggerbot detections before banning a client. This can, has, and will pick up clients using macro software as well as run of the mill cheaters. This check also DOES NOT RUN if the wait command is enabled on your server, as wait allows in-game macroing, making this a nonsensical check in that case.
// (defaults 0 - aka, it never bans, only logs. recommended 20+ if you are comfortable permabanning macroing users)
// -
// Default: "0"
// Minimum: "-1.000000"
stac_max_tbot_detections "0"

// [StAC] minimum interp (lerp) in milliseconds that a client is allowed to have before getting autokicked. set this to -1 to disable having a min interp
// (recommended disabled, but if you want to enable it, feel free. interp values below 15.1515151 ms don't seem to have any noticable effects on anything meaningful)
// -
// Default: "-1"
// Minimum: "-1.000000"
stac_min_interp_ms "-1"

// [StAC] maximum interp (lerp) in milliseconds that a client is allowed to have before getting autokicked. set this to -1 to disable having a max interp
// (recommended 101)
// -
// Default: "101"
// Minimum: "-1.000000"
stac_max_interp_ms "-1"

// [StAC] check AT LEAST this often in seconds for clients with violating cvar values/netprops
// (recommended 60)
// -
// Default: "60.000000"
// Minimum: "5.000000"
stac_min_randomcheck_secs "60.000000"

// [StAC] check AT MOST this often in seconds for clients with violating cvar values/netprops
// (recommended 300)
// -
// Default: "300.000000"
// Minimum: "15.000000"
stac_max_randomcheck_secs "300.000000"

// [StAC] enable/disable putting the currently recording demo in the SourceBans / gbans ban reason
// (recommended 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_include_demoname_in_banreason "1"

// [StAC] enable/disable logging to file
// (recommended 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_log_to_file "1"

// enable fixing pingmasking? This also allows StAC to ban cheating clients attempting to pingreduce.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_fixpingmasking_enabled "0"

// [StAC] maximum number of times a client can spam userinfo updates (over the course of 10 seconds) before getting banned.
// (recommended 10+)
// -
// Default: "25"
// Minimum: "-1.000000"
stac_max_userinfo_spam_detections "0"

// [StAC] Forcibly reconnect clients unauthorized with steam - this protects against cheat clients not setting steamids, at the cost of making your server inaccessible when Steam is down.
// (recommended 0, only enable this if you have consistent issues with unauthed cheaters!)
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_kick_unauthed_clients "0"

// [StAC] If this cvar is 0 (default), StAC will print detections to admins with sm_ban access and to SourceTV, if extant. If this cvar is 1, it will print only to SourceTV. If this cvar is 2, StAC never print anything in chat to anyone, ever. If this cvar is -1, StAC will print ALL detections to ALL players.
// (recommended 0)
// -
// Default: "0"
// Minimum: "-1.000000"
// Maximum: "2.000000"
stac_silent "2"

// [StAC] Max connections allowed from the same IP address. Useful for autokicking bots, though StAC should do that with cvar checks anyway.
// (recommended 0, you should really only enable this if you're getting swarmed by bots, and StAC isn't doing much against them, in which case, consider opening a bug report!)
// -
// Default: "0"
// Minimum: "0.000000"
stac_max_connections_from_ip "0"

// [StAC] allow StAC to work when sv_cheats is 1. WARNING; you might get false positives, and I will not provide support for servers running this cvar!
// (recommended 0)
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
stac_work_with_sv_cheats "0"

0 comments on commit 78300e2

Please sign in to comment.