Address code review feedback

- Fix option text handling to check for None instead of falsy
- Improve HTML cleaning with html.unescape and better tag removal
- Fix multi-line string in die() function
- Add html module import for proper HTML entity handling

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-22 22:40:38 +00:00
parent 7fe56d207f
commit 293066cbfd
3 changed files with 113 additions and 16 deletions

View file

@ -223,18 +223,110 @@ setadminpassword [password]
<h2 id="parameters">⚙️ Startup Parameters</h2>
<h3>Basic Startup</h3>
<pre><code>./srcds_run -console -game tf -ip 0.0.0.0 -port 27015 +map cp_dustbowl +maxplayers 24 +exec server.cfg
</code></pre>
<h3>Command Line Template</h3>
<p>The server uses the following command line template:</p>
<pre><code>-console %GAME_TYPE% %PID_FILE% %MAP% %IP% %PORT% %PLAYERS% -condebug</code></pre>
<h3>Common Parameters</h3>
<ul>
<li><code>-port [number]</code> - Set the server port</li>
<li><code>-maxplayers [number]</code> - Maximum player slots</li>
<li><code>-map [name]</code> - Starting map/level</li>
<li><code>-console</code> - Enable console output</li>
<li><code>-nographics</code> - Run without graphics (headless mode)</li>
</ul>
<h3>Available Startup Parameters</h3>
<p>The following parameters can be configured when starting the server:</p>
<div style="background: #1e3a5f; padding: 20px; border-left: 4px solid #3b82f6; margin: 20px 0; border-radius: 4px;">
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+sv_setsteamaccount</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Steam Account Login Token</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Manage your steam tokens here</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-sv_pure</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Pure Server</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">A pure server is one that forces all clients on the server to use content that matches what is on the server.</p>
<p style="color: #e5e7eb;"><strong>Options:</strong></p>
<ul style="color: #e5e7eb; margin-left: 20px;">
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">-1</code> - Do not apply any rules or restrict which files the client may load. (Default)</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">0</code> - Apply rules in cfg/pure_server_minimal.txt only</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">1</code> - Apply rules in cfg/pure_server_full.txt and then cfg/pure_server_whitelist.txt</li>
<li><code style="background: #0f172a; padding: 2px 6px; border-radius: 3px; color: #a5b4fc;">2</code> - Apply rules in cfg/pure_server_full.txt</li>
</ul>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-dev</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Developer Messages.</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Show developer messages.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-debuglog custom_error.log</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Error Logging</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">File Errors are Logged to.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-debug</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Debugging</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Turns on Debugging.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+motdfile custom_motd.txt</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Custom MOTD</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Custom MOTD file.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">+mapcyclefile custom_mapcycle.txt</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Custom Mapcycle</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Custom Mapcycle file.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-nomaster</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Disable master server communication</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">No description available</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-insecure</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - Disable Valve Anti-Cheat</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Will start the server without Valve Anti-Cheat technology.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-nohltv</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - No SourceTV</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Disables SourceTV and closes its port.</p>
</div>
<div style="margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #374151;">
<h4 style="color: #ffffff; margin-top: 0;">
<code style="background: #0f172a; padding: 4px 8px; border-radius: 3px; color: #a5b4fc;">-norestart</code>
<span style="color: #e5e7eb; font-weight: normal; font-size: 0.9em;"> - No Restart</span>
</h4>
<p style="color: #e5e7eb; margin: 10px 0;">Won't attempt to restart failed servers.</p>
</div>
</div>
<h3>Creating a Start Script</h3>