I’ve seen some people asking how to list their servers on the server list (without using jazz2.exe), so I’m writing this article…


Actually it is quite simple! How it works:

As Monolith said, the game server opens a connection with List Server at port 10054 and sends some data. When the connection is closed, the server gets delisted. This is an example of data sent by the Game Server with jazz2.exe


-> Hex:

44 27 74 65 73 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 0C 04 32 34 20 20


-> Plain Text

D ‘t e s t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4 (space) (space)


The first two bytes are always 44 27 (?)

Then, there are 32 bytes reserved to the Server Name. Bigger the server name, less 00 values. However, XJJ2 has a 31-length-limit for it. Therefore, i’m not sure if you can use the 32nd byte ;)


Now I’m going to focus the last 7 values

01 0C 04 32 34 20 20


The first two concern Current Players and Capacity.

Since jazz2 will not update these attributes, you should give them 00 values (the List Server will show [0/0]).


Then we have the byte which tells the list server the game type and if the server is public or not.


02 – Public Batlle

03 – Private Batlle

04 – Public Treasure

05 – Private Treasure

06 – Public CTF

07 – Private CTF


If you want to host a Race or a Coop give a 00 value to this byte (You will find “Unknown” in the server list) and add Coop or Race to the server name.


32 34 (24 in plain text) tells the list server you are hosting a 1.24 server. I believe the two last values are used in bigger server versions like “1.24 x” or “1.21 s”. Use the Plain > Hex feature in your hex editor to get the Hex values for your version.

Remeber you don’t need to send all this information. JJ2 detects the version (I think it is sent with the pseudo-PING).

And this syntax is not compulsory.

Here’s an example on how xjj2 sends the data:


-> Hex

44 27 62 67 75 6F 69 6A 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 61 74 74 6C 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


-> Plain Text

D ‘ b g u o i j (lots of spaces..) Battle . . . (and so on)


As you can see it only sends the server name! Uses several spaces to align the game type in it in order to fit that column when JJ2 is displaying the server list.


——-=> Listing a JJ2 server with mIRC scripting

I hope this helps….


First of all, create a file with your server info using a hex editor.

Make sure it is 42 bytes long. Do not forget the two spaces in the end.


REMOTE (ALT+R)


alias list_my_server { sockopen listms monolith.idlegames.com 10054 }


This opens a connection with list server monolith.idlegames.com, port 10054 and names it “listms”


on *:sockopen:listms: {

echo -a Connected to list server!

;When the connection is established it echoes a message saying that.

bread myserverinfofilepath 0 $file(myserverinfofilepath).size &info

;This will store all the data (which is achieved by telling mIRC that it should read so many bytes as the file size) contained in “myserverinfofilepath” since its beggining (that’s why there’s a “0” before $file) into the binary variable “&info”.

sockwrite listms &info

;sends the information which is stored in that var.

}

alias delist_my_server { sockclose listms }

alias run_jj2 { run c:\…\jazz2.exe necessary parameters }


Delists the server by breaking the connection.


Now you just have to type /list_my_server to list your server, /delist_my_server to delist your server and /run_jj2 to…

You might want to add some /echo’s (/help /echo for more info) in each part of the process.


Cya,


CaTaPhRaCt


Comments

Darkshadow on June 29, 2002 06:00

Pretty good article.

DS

Bjarni on January 31, 2003 06:00

Yeah!

Mad Teanager on January 31, 2003 06:00

Fine Article! :D

NebulaUOI on August 14, 2003 06:00

yes, I can confirm that if you’re hosting a shareware server, the last 4 bytes are ’32 31 20 73’ (‘21 s’). I tested it with a 1.23 shareware.

Jarno vos on December 11, 2005 16:58

huh?