Skip to content

Commit

Permalink
Removed forcing of http from matchconfig.sp and changed get5_loadmatc…
Browse files Browse the repository at this point in the history
…h_url instructions (splewis#574)

Co-authored-by: Michi <[email protected]>
  • Loading branch information
Apfelwurm and MD-V authored Oct 9, 2020
1 parent ffae6c9 commit 675c1b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Some client commands are available also for admin usage. For example, sm_pause a
- ``get5_loadmatch``: loads a match config file (JSON or keyvalues) relative from the ``csgo`` directory
- ``get5_loadbackup``: loads a get5 backup file
- ``get5_loadteam``: loads a team section from a file into a team
- ``get5_loadmatch_url``: loads a remote (JSON formatted) match config by sending a HTTP GET to the given url, this requires the [Steamworks](https://forums.alliedmods.net/showthread.php?t=229556) extension
- ``get5_loadmatch_url``: loads a remote (JSON formatted) match config by sending a HTTP(S) GET to the given url, this requires the [Steamworks](https://forums.alliedmods.net/showthread.php?t=229556) extension. When specifying an url with http:// or https:// in front, you have to put it in quotation marks.
- ``get5_endmatch``: force ends the current match
- ``get5_creatematch``: creates a Bo1 match with the current players on the server on the current map
- ``get5_scrim``: creates a Bo1 match with the using settings from ``configs/get5/scrim_template.cfg``
Expand Down
5 changes: 2 additions & 3 deletions scripting/get5/matchconfig.sp
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ stock bool LoadMatchFromUrl(const char[] url, ArrayList paramNames = null,
strcopy(g_LoadedConfigUrl, sizeof(g_LoadedConfigUrl), cleanedUrl);

if (steamWorksAvaliable) {
// Add the protocl strings. Only allow http since SteamWorks doesn't support http it seems?
ReplaceString(cleanedUrl, sizeof(cleanedUrl), "https://", "http://");
if (StrContains(cleanedUrl, "http://") == -1) {
// Add the protocol strings if missing (only http).
if (StrContains(cleanedUrl, "http://") == -1 && StrContains(cleanedUrl, "https://") == -1) {
Format(cleanedUrl, sizeof(cleanedUrl), "http://%s", cleanedUrl);
}
LogDebug("cleanedUrl (SteamWorks) = %s", cleanedUrl);
Expand Down

0 comments on commit 675c1b6

Please sign in to comment.