Jump to content

Talking between multiple servers and Ajax Chat


Recommended Posts

Hi !

I made a program that allows you to talk between several JKA servers and Web Chat.

 

It working in peer to peer, you don't need a master server. But all the peer must be know all the other peer.
The configurations are not very easy...

JK/OpenJk:

You must use the Jass Connector... Because the script is based on the logs generated by JASS Mod ! In the Jass configuration you must activate the "log" to 2 in the jass.ini
Note: JassMod is compatible with the all other mod and OpenJk.

System : Linux / Windows servers

WebChat:

You must use the Mysql connector, but this connecter is not very stable... I'm working for corrected the problem.

System: Windows servers (Not ready for linux)

 

Sources:

JASS_Connector: http://pastebin.com/mSgWFtV5

MYSQL_BDD connector: http://pastebin.com/6tz8ip3G

 

Note: i will make a github...

 

Demo:

http://image.noelshack.com/fichiers/2013/43/1382466561-bddtojka.jpg

http://image.noelshack.com/fichiers/2013/43/1382466568-jkatoall.jpg

 

You can try in live on the "Ninja servers" (ja+ // Fullforce // base) but you must be registered on ninja-gaming.fr for try the WebChat (http://ninja-gaming.fr/v2/chat.php).

 

Download:

http://tlams.free.fr//JKchat/chat_by_tlams.rar

 

Installation:

ONE game server = ONE jass folder = ONE conf.ini = ONE process

ONE Web chat = ONE bdd folder = ONE conf.ini = ONE process

1382468373-capture.jpg

 

 

 

Architecture example:

http://image.noelshack.com/fichiers/2013/43/1382471228-schema1.png

 

Config files example:

 

------JASS CONNECTOR(config.ini) SERVER1----------

[JKA]logfile = C:\Users\Tlams\Desktop\jkchat\V2\games.log <= THE JASS LOG FILERCON = rconPW   <= JKA RCONIP_server = 10.8.0.1 <= Your IP JK ServerPORT_server =  29070 <= Your port JK Server[PEERS]IP_Autorise = 10.8.0.10,88.181.10.2,88.181.10.3 <= Ip Peer Allowed for reveive List_servers = 10.8.0.10:28801,88.181.10.2:28800,88.181.10.3:28801 <= Ip/ports peer to send [LOCAL]PORT = 28800 <= JASS PORT ! YOU MUST ADD A PAT RULE ON YOUR ROUTER (UDP)IP = 10.8.0.1 <= YOU LOCAL SERVER IP OR PUBLIC IP IF YOUR NETWORK CART HAVE A DIRECT PUBLIC IP Username = ServerJK1 <= Name for this serverPassword =  Common_password <= Common password with the ALL OTHER PEERS[LANG]player_co = ^1Connected to player_disco = ^1Disconnected to 

#

------JASS CONNECTOR(config.ini) SERVER2----------

#[JKA]logfile = C:\Users\Tlams\Desktop\jkchat\V2\games.log <= THE JASS LOG FILERCON = rconPW   <= JKA RCONIP_server = 10.8.0.10 <= Your IP JK ServerPORT_server =  29060 <= Your port JK Server[PEERS]IP_Autorise = 10.8.0.1,88.181.10.2,88.181.10.3 <= Ip Peer Allowed for reveive List_servers = 10.8.0.1:28800,88.181.10.2:28800,88.181.10.3:28801 <= Ip/ports peer to send [LOCAL]PORT = 28801 <= JASS PORT ! YOU MUST ADD A PAT RULE ON YOUR ROUTER (UDP)IP = 10.8.0.10 <= YOU LOCAL SERVER IP OR PUBLIC IP IF YOUR NETWORK CART HAVE A DIRECT PUBLIC IP Username = ServerJK2 <= Name for this serverPassword =  Common_password <= Common password with the ALL OTHER PEERS[LANG]player_co = ^1Connected to player_disco = ^1Disconnected to 

#

------JASS CONNECTOR(config.ini) SERVER3----------

#[JKA]logfile = C:\Users\Tlams\Desktop\jkchat\V2\games.log <= THE JASS LOG FILERCON = rconPW   <= JKA RCONIP_server = 88.181.10.2 <= Your IP JK ServerPORT_server =  29070 <= Your port JK Server[PEERS]IP_Autorise = 88.181.10.3,98.10.5.56 <= Ip Peer Allowed for reveive List_servers = 88.181.10.3:28801,98.10.5.56:28801,98.10.5.56:28800 <= Ip/ports peer to send [LOCAL]PORT = 28800 <= JASS PORT ! YOU MUST ADD A PAT RULE ON YOUR ROUTER (UDP)IP = 10.8.0.10 <= YOU LOCAL SERVER IP OR PUBLIC IP IF YOUR NETWORK CART HAVE A DIRECT PUBLIC IP Username = ServerJK3 <= Name for this serverPassword =  Common_password <= Common password with the ALL OTHER PEERS[LANG]player_co = ^1Connected to player_disco = ^1Disconnected to 

#

------BDD/MYSQL CONNECTOR(config.ini)----------

#

[PEERS]IP_Autorise = 88.181.10.2,98.10.5.56 <= Ip Peer Allowed for reveive List_servers = 88.181.10.2:28800,98.10.5.56:28801,98.10.5.56:28800 <= Ip/ports peer to send [LOCAL]PORT = 28801  <= JASS PORT ! YOU MUST ADD A PAT RULE ON YOUR ROUTER (UDP) IP = 88.181.10.3 <= YOU LOCAL SERVER IP OR PUBLIC IP IF YOUR NETWORK CART HAVE A DIRECT PUBLIC IP Username = CHAT <= Name for this serverPassword = Common_password <= Common password with the ALL OTHER PEERS[MYSQL]MYSQL_IP = 88.181.10.3 <= Your MYSQL IP serverMYSQL_USER = user  MYSQL_PASSWORD = pwMYSQL_BD_NAME = bdnameMYSQL_TB_NAME = Table_nameMYSQL_BD_Col_Message = message_colMYSQL_BD_Col_username = name_user_colMYSQL_BD_Col_id = id_colMYSQL_BD_Col_time = time_colMYSQL_BD_Col_time_format = UNIX  <= NOT CHANGE (Not compatible with other date system)

-----------------------------

 

Note:

I'm sorry for my bad english !

ent likes this
Link to comment

I don't think JASS works with OpenJK and its 99.999999999% irrelevant with OpenJK anyway (at least stuff that pertains to engine and not directly related to mod code, which would of course require fixed mod code like most of what is fixed in OpenJK's mod code), as all those things are fixed natively.

 

--

 

Why not just implement this into an openjk forked server side enhancement sending some packets between.

Link to comment

Why Ajax? Ajax is not even really appropriate or efficient. A much better solution imo. In addition to faster connection speeds, you can connect the servers (er..clients?) to global channels which can be accessed even out of game. It's an attractive concept, at least in theory.

Link to comment

Conventional JA servers will be a thing of the past when OpenJK is released stable tbh (except for MB2).

I don't think you can completely rule them out since people are lazy.

 

But yeah, using engine hooks doesn't future proof your mod very much.

JKG Developer

Link to comment

I don't think you can completely rule them out since people are lazy.

 

But yeah, using engine hooks doesn't future proof your mod very much.

Seeing as how it has Linux x64 support (or will) and lots and lots of exploit fixes? I doubt it.

Now, whether or not we see a high client adoption rate, that's open to debate. But OpenJK is the only native JKA Linux client that I'm aware of.

EscapedTurkey has already partnered with us for server side adoption.

Link to comment

From what I remember, JASS is a vmMain/syscall proxy, regardless of engine modifications (Which I assume are disabled on unrecognised engines)

Which means JASS will only work in conjunction with OpenJK on legacy mods (i.e. not using the new module API)

Link to comment
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...