P2P Chat - True Global Chat Between Servers

http://img195.imageshack.us/img195/337/aglobal.png

http://img14.imageshack.us/img14/410/globala.png

True Global Chat Between Servers

*After seeing The-Stone’s addon for global chat between servers,
something I have wanted to do for awhile but haven’t been bothered to do so.
I decided to write one myself.

This global chat addon utilizes gm_oosocks module written by me,
which allows a large group of servers to communicate between each other.

This uses a single UDP socket to send and receive messages between each server.*

**For the people who just want the addon, I’ll just cut the crap and give you a download link. **

I will only provide a SVN link: http://gmod-haza.googlecode.com/svn/trunk/P2PChat/

To setup, simply modify garrysmod\addons\p2pchat\lua\autorun__p2pchat_init.lua.
The instructions on what to do are all listed there.

The default chat prefixes are “]]” for global chat. “[[” for global admin chat.

If you have any question don’t be afraid to ask.

quite nice :smiley:

Awesome.

Pff.
We’re going to finish gchat anyway.

It’s quite nice.

so for the ports, do all of them need to be the same, or are they all different?

Generally, they should all be different.

Now, on my box I have two servers on the same IP, but on different ports, should I use the gameserver ports, or open ports?

Can I haz your babies?

[editline]07:43PM[/editline]

Any commands i haz to put in console? D:

[editline]07:45PM[/editline]

The Tag does nothing D:

The ports should be unused ports

For example on the
First server
[lua]
// Comma sperated table of all the other servers. This does not include this server.
// Format is {“IP”, Port}
local const_P2PPeers = {{“192.168.1.3”, 28030}};

local const_P2PListenIP = “192.168.1.3”;
local const_P2PListenPort = 28025;
[/lua]

Second server
[lua]
// Comma sperated table of all the other servers. This does not include this server.
// Format is {“IP”, Port}
local const_P2PPeers = {{“192.168.1.3”, 28025}};

local const_P2PListenIP = “192.168.1.3”;
local const_P2PListenPort = 28030;
[/lua]

P2P chat isn’t really the best of ideas for this. A centralised server would probably be a better approach but it’s totally open to abuse sadly.

Well, if you don’t want to waste processing power on a central server, then P2P chat is awesome!

Central server would add more complexity.

This ^ is what I was trying to do. Might finish it somewhen.

Sorry for bump, but how do I go about using this with PHP? (Mainly just for sending data to the servers; data coming in is already done)

Learn LUA & PHP?

Hey, I’m sorry that I’ve never had to use sockets in my life. Cut me some slack here.

Mine isn’t working /cry

Sry for this bump, but can anyone help me get this working in DarkRP. It doesnt recognise the commands. I changed it several times, but no succes. I have no problems in my other servers, it’s only DarkRP.

How to install it ?
i have it on my two server.
what now ?
THX