From a3f411fa43c86e22adad626a3c9a5cf742117920 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 21:28:15 +0000 Subject: [PATCH 1/3] feat (game server): StickyBots Server (#2096) --- .../config-lgsm/pstbsserver/_default.cfg | 1 - .../config-lgsm/sbotsserver/_default.cfg | 127 ++++++++++++++++++ .../config-lgsm/squadserver/_default.cfg | 2 +- lgsm/data/serverlist.csv | 1 + lgsm/functions/info_config.sh | 18 +++ lgsm/functions/info_glibc.sh | 3 + lgsm/functions/info_messages.sh | 21 ++- lgsm/functions/info_parms.sh | 12 ++ lgsm/functions/query_gamedig.sh | 12 +- 9 files changed, 186 insertions(+), 11 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/sbotsserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 7d1fb6b97..19845ee25 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -9,7 +9,6 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - ip="0.0.0.0" randommap="ALWAYS" port="10027" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg new file mode 100644 index 000000000..fd3da3143 --- /dev/null +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -0,0 +1,127 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +port="7777" +queryport="27015" +defaultmap="StationKappa" +servername="LinuxGSM Server" +serverpassword="NOT SET" # Can't be adjusted currently +maxplayers="8" # Can't be adjusted currently + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info +postalert="off" +postdays="7" +posttarget="https://hastebin.com" + +# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun +mailgunalert="off" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover +pushoveralert="off" +pushovertoken="accesstoken" + +# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram +# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +## SteamCMD Settings +# Server appid +appid="974130" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="StickyBots" +engine="unreal4" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${systemdir}/blank1/Binaries/Linux" +executable="./blank1Server-Linux-Shipping" +servercfg="Game.ini" +servercfgdefault="Game.ini" +servercfgdir="${systemdir}/blank1/Saved/Config/Windows" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +alertlog="${lgsmlogdir}/${servicename}-alert.log" +postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" \ No newline at end of file diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index f2ef9badf..60284ca6f 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -9,10 +9,10 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="0.0.0.0" port="7787" queryport="27165" randommap="ALWAYS" -ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 2a55c4122..497f37c8d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -64,6 +64,7 @@ ricochet,ricochetserver,Ricochet rust,rustserver,Rust rw,rwserver, Rising World samp,sampserver,San Andreas Multiplayer +sbot,sbotserver, StickyBots ss3,ss3server,Serious Sam 3: BFE sb,sbserver,Starbound st,stserver,Stationeers diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 93912c529..6116fa144 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -612,6 +612,21 @@ fn_info_config_seriousengine35(){ fi } +#StickyBots +fn_info_config_sbots(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername="$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//')" + maxplayers="$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]')" + fi + + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + fn_info_config_source(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1204,6 +1219,9 @@ elif [ "${shortname}" == "mumble" ]; then # San Andreas Multiplayer elif [ "${shortname}" == "samp" ]; then fn_info_config_samp +# StickyBots +elif [ "${shortname}" == "pstbs" ]; then + fn_info_config_sbots # Teeworlds elif [ "${shortname}" == "tw" ]; then fn_info_config_teeworlds diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 015c1e169..d383daab6 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -114,6 +114,9 @@ elif [ "${gamename}" == "Squad" ]; then elif [ "${gamename}" == "Sven Co-op" ]; then glibcrequired="2.18" glibcfix="no" +elif [ "${shortname}" == "sbots" ]; then + glibcrequired="2.17" + glibcfix="no" elif [ "${gamename}" == "Team Fortress 2" ]; then glibcrequired="2.15" glibcfix="yes" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 03ebcda49..24821c9cd 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -231,7 +231,10 @@ fn_info_message_gameserver(){ echo -e "${blue}Current Scenario:\t${default}${gdgamemode}" fi else - echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}" + # Current Scenario + if [ -n "${gdgamemode}" ]; then + echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}" + fi fi # Default Map @@ -746,7 +749,7 @@ fn_info_message_mumble(){ echo -e "> ServerQuery\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t } -fn_info_Message_pstbs(){ +fn_info_message_pstbs(){ echo -e "netstat -atunp | grep PostScriptum" echo -e "" { @@ -889,6 +892,16 @@ fn_info_message_seriousengine35(){ } | column -s $'\t' -t } +fn_info_message_sbots(){ + echo -e "netstat -atunp | grep blank1" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_sdtd(){ fn_info_message_password_strip echo -e "netstat -atunp | grep 7DaysToDie" @@ -1182,7 +1195,7 @@ fn_info_message_select_engine(){ elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 elif [ "${shortname}" == "pstbs" ]; then - fn_info_Message_pstbs + fn_info_message_pstbs elif [ "${gamename}" == "Project Cars" ]; then fn_info_message_projectcars elif [ "${gamename}" == "QuakeWorld" ]; then @@ -1199,6 +1212,8 @@ fn_info_message_select_engine(){ fn_info_message_squad elif [ "${gamename}" == "Stationeers" ]; then fn_info_message_stationeers + elif [ "${shortname}" == "sbots" ]; then + fn_info_message_sbots elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_info_message_teamspeak3 elif [ "${gamename}" == "Tower Unite" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index ced392bc6..133365fd8 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -125,6 +125,15 @@ fn_info_parms_spark(){ mods=${mods:-"NOT SET"} } +fn_info_parms_stickybots(){ + port=${port:-"0"} + queryport=${queryport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + fn_info_config_towerunite(){ port=${port:-"0"} queryport=${queryport:-"0"} @@ -185,6 +194,9 @@ elif [ "${shortname}" == "rust" ]; then # Rising World elif [ "${shortname}" == "rw" ]; then fn_info_parms_risingworld +# Sticky Bots +elif [ "${shortname}" == "sbots" ]; then + fn_info_parms_stickybots # Serious Sam elif [ "${shortname}" == "ss3" ]; then fn_info_config_seriousengine35 diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 1bdce107a..21e0ed091 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -89,37 +89,37 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # server name gdname=$(echo "${gamedigraw}" | jq -re '.name') if [ "${gdname}" == "null" ]; then - gdname= + unset gdname fi # numplayers gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length') if [ "${gdplayers}" == "null" ]; then - gdplayers= + unset gdplayers fi # maxplayers gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length') if [ "${gdmaxplayers}" == "null" ]; then - maxplayers= + unset maxplayers fi # current map gdmap=$(echo "${gamedigraw}" | jq -re '.map') if [ "${gdmap}" == "null" ]; then - gdmap= + unset gdmap fi # current gamemode gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') if [ "${gdgamemode}" == "null" ]; then - gdgamemode= + unset gdgamemode fi # numbots gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') if [ "${gdbots}" == "null" ]; then - gdbots= + unset gdbots fi fi fi \ No newline at end of file From 5cdd4031da393c81ee366c1651d7290637b18da5 Mon Sep 17 00:00:00 2001 From: Kaotic Date: Fri, 7 Dec 2018 22:32:41 +0100 Subject: [PATCH 2/3] feat (csgoserver): add Danger Zone game mode example (#2095) --- .../config-lgsm/csgoserver/_default.cfg | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 7cbdb93f6..baa2f81d0 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -10,14 +10,15 @@ ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters # https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server -# [Game Modes] gametype gamemode mapgroup (you can mix these across Game Modes, but use only one) -# Arms Race 1 0 mg_armsrace -# Classic Casual 0 0 mg_casualsigma, mg_casualdelta -# Classic Competitive 0 1 mg_active, mg_reserves, mg_hostage, mg_de_dust2 -# Custom 3 0 -# Deathmatch 1 2 mg_deathmatch -# Demolition 1 1 mg_demolition -# Wingman 0 2 +# [Game Modes] gametype gamemode mapgroup (you can mix these across Game Modes, but use only one) +# Arms Race 1 0 mg_armsrace +# Classic Casual 0 0 mg_casualsigma, mg_casualdelta +# Classic Competitive 0 1 mg_active, mg_reserves, mg_hostage, mg_de_dust2 +# Custom 3 0 +# Deathmatch 1 2 mg_deathmatch +# Demolition 1 1 mg_demolition +# Wingman 0 2 +# Danger Zone (FreeForAll) 6 0 mg_dz_blacksite gametype="0" gamemode="0" mapgroup="mg_active" From 50f1c08321c19b6bdff74b86b69baa5750c76b71 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 21:51:11 +0000 Subject: [PATCH 3/3] Create CODE_OF_CONDUCT.md (#2091) docs: create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..7fe220357 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,73 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at me@danielgibbs.co.uk. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq