Skip to content
Snippets Groups Projects

srb2:// server URLs

Merged colette requested to merge fickleheart/SRB2:netgame-urls into master
All threads resolved!

Probably super pointless for most people. I thought it'd be nifty to have available.

There's some manual setup involved to get this working. For Windows, I've written this registry file that registers the protocol without defining an EXE to use: srb2protocol.reg. Please do your due diligence and don't add arbitrary registry entries to your operating system without knowing what they do, since they can easily fuck your shit up!!! Open it in a text editor and look up the keywords you see in there to verify that it's okay. (Other OSes have a different process for this. I'll leave that as an exercise to the interested parties.)

Once you have that set up, you can host a netgame on your local machine, then join it (with an EXE that includes this branch) just by clicking on :point_right: srb2://127.0.0.1 :point_left: this link! I tested the URL handling on Firefox. Presumably it works similarly on all browsers.

"But what's the point of all this???" idk you could put a link into Discord (wrapped in <> so it becomes clickable) and make it quick for people to join?

(The registry file is based on this SO answer: https://stackoverflow.com/questions/389204/how-do-i-create-my-own-url-protocol-e-g-so - I only defined the protocol itself so that the system could let the user choose what program to open it with, so only the first entry mentioned was added.)

Edited by colette

Merge request reports

Checking pipeline status.

Approval is optional
Ready to merge by members who can write to the target branch.

Merge details

  • 3 commits and 1 merge commit will be added to master.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • colette added 1 commit

    added 1 commit

    • f32ab591 - Define SERVER_URL_PROTOCOL const for easy reconfiguration

    Compare with previous version

  • colette resolved all discussions

    resolved all discussions

  • closed

  • reopened

  • James R.
  • colette added 46 commits

    added 46 commits

    Compare with previous version

  • colette added 2 commits

    added 2 commits

    • 6845aca6 - Make chdir usage consistent with other source usage
    • be07a23e - Make a separate function instead of clogging up IdentifyVersion

    Compare with previous version

  • James R. resolved all discussions

    resolved all discussions

  • merged

  • James R. mentioned in commit 40ec8c43

    mentioned in commit 40ec8c43

  • Please register or sign in to reply
    Loading