HWPlaySchemeSyntax.wiki
changeset 1495 88ae278e5484
parent 1494 272505d2f8c9
child 1496 eb4548a39445
equal deleted inserted replaced
1494:272505d2f8c9 1495:88ae278e5484
     1 #summary The Hedgewars URL scheme handler
     1 #summary The Hedgewars URL scheme handler
     2 
     2 
     3 = URL scheme handler =
     3 = Hedgewars server links =
     4 
     4 
     5 == Overview ==
     5 == Overview ==
     6 Hedgewars supports an URL scheme for Hedgewars servers and rooms. These are basically links which allow you to join a server (and optionally a room) by using a simple link. You can join a Hedgewars server with a single click. These links are called “`hwplay` URLs” and look like this:
     6 Hedgewars supports special links for Hedgewars servers and rooms. You can join a server (and optionally a room) by using a simple link. These links always start with “`hwplay://` and look like this:
     7 
     7 
     8 `hwplay://hedgewars.example.org`
     8 `hwplay://hedgewars.example.org`
     9 
     9 
    10 If your system is set-up to handle `hwplay` URLs, they will open Hedgewars and make it join the given server and room.
    10 If your system is set-up to handle `hwplay` URLs, it will start Hedgewars and puts you immediately in the server.
    11 
    11 
    12 The following link goes to the official Hedgewars server. Try it to test if `hwplay` links work on your system:
    12 The following link goes to the official Hedgewars server, you can try it out right now:
    13 
    13 
    14 [hwplay://netserver.hedgewars.org]
    14 [hwplay://netserver.hedgewars.org]
    15 
    15 
    16 == Usage ==
    16 == Usage ==
    17 You can share a `hwplay` URL with other players so they join your server more easily.
       
    18 
       
    19 Your browser and other software needs to learn first how to deal with `hwplay`.
    17 Your browser and other software needs to learn first how to deal with `hwplay`.
    20 We recommend to first click on “Assign file types” in the Settings menu, Advanced tab, this should set things up automatically for you.
    18 We recommend to first click on “Assign file types” in the Settings menu, Advanced tab, this should set things up automatically for you.
    21 
    19 
    22 If an application (like a browser) is confused about `hwplay`, point it to the Hedgewars program (`hedgewars.exe` on Windows, `hedgewars` on GNU/Linux and Mac OS).
    20 If an application (like a browser) is confused about `hwplay`, point it to the Hedgewars program (`hedgewars.exe` on Windows, `hedgewars` on GNU/Linux and Mac OS).
    23 
    21 
    31 Note the generated URL might only work in your LAN and not world wide, so please check the IP address. You can obtain your Internet IP address on http://myip.is/ (for example).
    29 Note the generated URL might only work in your LAN and not world wide, so please check the IP address. You can obtain your Internet IP address on http://myip.is/ (for example).
    32 
    30 
    33 Of course, you can also try to create the URLs from hand (see below).
    31 Of course, you can also try to create the URLs from hand (see below).
    34 
    32 
    35 == Syntax ==
    33 == Syntax ==
    36 The syntax of the “hwplay” URL scheme is:
    34 `hwplay` is an unofficial URL scheme supported by Hedgewars. The syntax of the “hwplay” URL scheme is:
    37 
    35 
    38 `hwplay://<HOST>[:<PORT NUMBER>[?room=<ROOM NAME>]]`
    36 `hwplay://<HOST>[:<PORT NUMBER>[?room=<ROOM NAME>]]`
    39 
    37 
    40 Parts in square brackets are optional.
    38 Parts in square brackets are optional.
    41 Parts enclosed in less-then and greater-than signs are parameters, where
    39 Parts enclosed in less-then and greater-than signs are parameters, where
    44  * `<PORT NUMBER>` stands for the TCP port number of the server
    42  * `<PORT NUMBER>` stands for the TCP port number of the server
    45  * `<ROOM NAME>` is the name of a room in the server
    43  * `<ROOM NAME>` is the name of a room in the server
    46 
    44 
    47 If the port number is omitted, Hedgewars assumes the default port 46631.
    45 If the port number is omitted, Hedgewars assumes the default port 46631.
    48 
    46 
    49 If the room name is given, the user will automatically join this room. If it is not given, the user will start in the lobby of the server.
    47 If the room name is given, the user will automatically join this room. Otherwise, the user will start in the lobby of the server.
    50 
    48 
    51 == Examples ==
    49 == Examples ==
    52 Here are some example `hwplay` URLs:
    50 Here are some example `hwplay` URLs:
    53 
    51 
    54  * [hwplay://netserver.hedgewars.org]: Points to the lobby of the official server. This is the same as if you'd click on the “official server” button in the main menu
    52  * [hwplay://netserver.hedgewars.org]: Points to the lobby of the official server. This is the same as if you'd click on the “official server” button in the main menu