[img]http://img195.imageshack.us/img195/337/aglobal.png[/img]
[img]http://img14.imageshack.us/img14/410/globala.png[/img]
[b]True Global Chat Between Servers[/b]
[i]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.[/i]
[b]For the people who just want the addon, I'll just cut the crap and give you a download link. [/b]
I will only provide a SVN link: [url]http://gmod-haza.googlecode.com/svn/trunk/P2PChat/[/url]
[b]To setup, simply modify garrysmod\addons\p2pchat\lua\autorun\__p2pchat_init.lua[/b].
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 :D
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?
[QUOTE=bob builder;17448432]so for the ports, do all of them need to be the same, or are they all different?[/QUOTE]
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:
[QUOTE=bob builder;17448739]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?[/QUOTE]
The ports should be [b]unused ports[/b]
For example on the
[b]First server[/b]
[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]
[b]Second server[/b]
[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!
[QUOTE=Hexxeh;17486111]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.[/QUOTE]
Central server would add more complexity.
[QUOTE=Hexxeh;17486111]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.[/QUOTE]
[QUOTE=haza55;17491009]Central server would add more complexity.[/QUOTE]
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
[QUOTE=haza55;17444718][img]http://img195.imageshack.us/img195/337/aglobal.png[/img]
[img]http://img14.imageshack.us/img14/410/globala.png[/img]
[b]True Global Chat Between Servers[/b]
[i]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_luasocket modules written by Anders1,
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.[/i]
[b]For the people who just want the addon, I'll just cut the crap and give you a download link. [/b]
I will only provide a SVN link: [url]http://gmod-haza.googlecode.com/svn/trunk/P2PChat/[/url]
[b]To setup, simply modify garrysmod\addons\p2pchat\lua\autorun\__p2pchat_init.lua[/b].
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.[/QUOTE]
Is this addon still functional? I tried it and it did not work.
You should update this for your OOSocks module.
This error in my server console.
[CODE]error loading module 'luasocket' from file 'c:\sandbox\orangebox\garrysmod\lua\includes\modules\gm_luasocket.dll'[/CODE]
[QUOTE=Pizzi;21765002]This error in my server console.
[CODE]error loading module 'luasocket' from file 'c:\sandbox\orangebox\garrysmod\lua\includes\modules\gm_luasocket.dll'[/CODE][/QUOTE]
The lua socket module is [B][U]DEAD[/U][/B]
Use OOSocks instead
Does the script need to be rewritten for it to function with OOSocks? Or can we just install OOSocks for it to work?
[QUOTE=stuky4ever;21884390]Does the script need to be rewritten for it to function with OOSocks? Or can we just install OOSocks for it to work?[/QUOTE]
rewritten, unless someone makes a wrapper... Just wait for a rewrite.
Updated for use with gm_oosocks.
this lags my server AND kills my CPU...
Processor: AMD Athlon(tm) II X3 500 Processor 3.00 GHz
Installed memory (RAM): 8.00 GB
System type: 64-bit Operating System
So if im having servers xx.xx.xxx.xx:27027 and xx.xx.xxx.xx:27028
Should it look like this?
// Comma sperated table of all the other servers. This does not include this server.
// Format is {"IP", Port}
local const_P2PPeers = {{"xx.xx.xxx.xx", 27027}};
local const_P2PListenIP = "xx.xx.xxx.xx";
local const_P2PListenPort = 27028;
// Comma sperated table of all the other servers. This does not include this server.
// Format is {"IP", Port}
local const_P2PPeers = {{"xx.xx.xxx.xx", 27028}};
local const_P2PListenIP = "xx.xx.xxx.xx";
local const_P2PListenPort = 27027;
?
Because for some reason i don't get this to work :<
I also tryed ports what arent in use. :< still don't work
Sorry, you need to Log In to post a reply to this thread.