Skip to content

Commit

Permalink
Added allowbannedinpublicservers
Browse files Browse the repository at this point in the history
  • Loading branch information
lenosisnickerboa committed Nov 1, 2020
1 parent 1e401d0 commit 937b4dd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/contribs.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ set windows_wget_url "https://eternallybored.org/misc/wget/releases/wget-1.20.3-
set linux_metamod_version "1.10.7-git971"
set linux_metamod_home_url "http://www.metamodsource.net/"
set linux_metamod_url "https://mms.alliedmods.net/mmsdrop/1.10/mmsource-1.10.7-git971-linux.tar.gz"
set linux_sourcemod_version "1.10.0-git6488"
set linux_sourcemod_version "1.10.0-git6499"
set linux_sourcemod_home_url "http://www.sourcemod.net/"
set linux_sourcemod_url "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6488-linux.tar.gz"
set linux_sourcemod_url "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6499-linux.tar.gz"
set linux_franug_knifes_version "sha-ff449c6-2016-05-05"
set linux_franug_knifes_home_url "https://github.com/Franc1sco/Franug-Knifes"
set linux_franug_knifes_url "https://github.com/Franc1sco/Franug-Knifes/archive/ff449c6.zip"
Expand Down Expand Up @@ -59,9 +59,9 @@ set linux_splewis_pugsetup_url "https://github.com/splewis/csgo-pug-setup/releas
set windows_metamod_version "1.10.7-git971"
set windows_metamod_home_url "http://www.metamodsource.net/"
set windows_metamod_url "https://mms.alliedmods.net/mmsdrop/1.10/mmsource-1.10.7-git971-windows.zip"
set windows_sourcemod_version "1.10.0-git6488"
set windows_sourcemod_version "1.10.0-git6499"
set windows_sourcemod_home_url "http://www.sourcemod.net/"
set windows_sourcemod_url "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6488-windows.zip"
set windows_sourcemod_url "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6499-windows.zip"
set windows_franug_knifes_version "sha-ff449c6-2016-05-05"
set windows_franug_knifes_home_url "https://github.com/Franc1sco/Franug-Knifes"
set windows_franug_knifes_url "https://github.com/Franc1sco/Franug-Knifes/archive/ff449c6.zip"
Expand Down
8 changes: 5 additions & 3 deletions src/page_sourcemod.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ variable sourcemodConfig [CreateConfig \
[list \
"bool" [list enable "1" "Controls if sourcemod functionality is enabled. If disabled ALL other plugins below are also disabled." onchange "SetSourcemodState"]\
"bool" [list lanonly "0" "Only enable sourcemod in lanonly mode"]\
"bool" [list banprotection "1" "Disables all known unsafe plugins and sets FollowCSGOServerGuidelines to \"yes\".\nWhen you disable ban protection FollowCSGOServerGuidelines is set to \"no\" to allow plugins full access.\nDO NOT DISABLE THIS OPTION UNLESS YOU HAVE READ THE HELP PAGE FIRST!\nYOUR SERVER MAY BE BANNED!"]\
"bool" [list banprotection "1" "Disables all known unsafe plugins and sets FollowCSGOServerGuidelines to \"yes\".\nWhen you disable ban protection FollowCSGOServerGuidelines is set to \"no\" to allow plugins full access.\nDO NOT DISABLE THIS OPTION UNLESS YOU HAVE READ THE HELP PAGE FIRST! YOUR SERVER MAY BE BANNED!"]\
"bool" [list allowbannedinpublicservers "0" "If enabled allows banned plugins to be used in public servers.\nI take no responsibility, you're on your own.\nYOUR SERVER MAY BE BANNED!"]\
"string" [list admins "" "List all users (separated by space) you want to give admin permissions on your server\nA user is identified by their steam id (e.g STEAM_1:1:12345678) or ip address (e.g. 192.168.1.123).\nSee help page for more information about how to obtain your steam id or find users ip address."]\
"bool" [list sm_mapchooser_enable "0" "Controls if this sourcemod plugin is enabled." onchange "SetSourcemodMapChooserState"]\
"bool" [list sm_mapchooser_lanonly "1" "Only enable this sourcemod plugin in lanonly mode"]\
Expand Down Expand Up @@ -199,7 +200,8 @@ variable sourcemodLayout [CreateLayout \
line [list] \
space [list] \
parm [list banprotection] \
warning [list "The first time you enable banprotection you need to update the server by clicking the \"Update Server\" button"] \
parm [list allowbannedinpublicservers]\
warning [list "The first time you disable banprotection you need to update the server by clicking the \"Update Server\" button"] \
warning [list "above. This will install the plugins below. The plugins will still be disabled until you enable them below. If you"] \
warning [list "decide to reenable banprotection read the help page for instructions on how to ensure that plugins below are"] \
warning [list "completely removed from the file system."] \
Expand All @@ -224,7 +226,7 @@ proc SetSourcemodState { value } {
global sourcemodLayout
set cp [GetCp]
set enabled $value
foreach parm [list lanonly banprotection admins sm_mapchooser_enable sm_mapchooser_lanonly sm_mapchooser_mapvote_endvote\
foreach parm [list lanonly banprotection allowbannedinpublicservers admins sm_mapchooser_enable sm_mapchooser_lanonly sm_mapchooser_mapvote_endvote\
sm_nominations_enable sm_nominations_lanonly sm_rockthevote_enable sm_rockthevote_lanonly\
sm_nextmap_enable sm_nextmap_lanonly sm_randomcycle_enable sm_randomcycle_lanonly\
sm_warmod_enable sm_warmod_lanonly sm_multi1v1_enable sm_multi1v1_lanonly sm_multi1v1_flashbangs_enable\
Expand Down
17 changes: 13 additions & 4 deletions src/server_support.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,18 @@ proc StartServer {} {
SaveAll skipStandalone
global sourcemodConfig
set banProtection [GetConfigValue $sourcemodConfig banprotection]
set allowBannedInPublicServers [GetConfigValue $sourcemodConfig allowbannedinpublicservers]
if { $banProtection == 0 } {
Trace "====================================================================="
Trace "Sourcemod banprotection is disabled, enforcing GSLT-less lanonly mode"
Trace "====================================================================="
if { $allowBannedInPublicServers != 0 } {
Trace "======================================================================="
Trace "Sourcemod banprotection is disabled and allowbannedinpublicservers is"
Trace "enabled. You're on your own, don't blame me if your server gets banned."
Trace "======================================================================="
} else {
Trace "======================================================================="
Trace "Sourcemod banprotection is disabled, enforcing GSLT-less lanonly mode"
Trace "======================================================================="
}
}
global installFolder

Expand All @@ -104,11 +112,12 @@ proc GetStartServerCommand {} {

global sourcemodConfig
set banProtection [GetConfigValue $sourcemodConfig banprotection]
set allowBannedInPublicServers [GetConfigValue $sourcemodConfig allowbannedinpublicservers]
set steamAccountOption ""
set apiAuthKeyOption ""
set serverLanOption "+sv_lan 1"
set serverNetPortTry ""
if { $banProtection != 0 } {
if { $banProtection != 0 || $allowBannedInPublicServers != 0 } {
set serverLan [GetConfigValue $serverConfig lanonly]
set serverLanOption "+sv_lan $serverLan"
if { $serverLan == 0 } {
Expand Down

0 comments on commit 937b4dd

Please sign in to comment.