As seen in key G-mod communities, you can now chat across multiple servers using this MySQL based script
This is a customizable addon using andyvincent's MySQL module to transmit chat messages over multiple servers.
[list][*] Customizable refresh rate (how often to recieve new messages from the MySQL)[*] Customizable table deletion time (How often to purge the MySQL table of all messages, to reduce lag and large queries)[*] Anti-Flood (Or anti-spam) with a time setting[*] Countless other script traits and variables I could define as a *feature* ?[/list][/release]
This requires your own MySQL Database to use.
This will not work without the gm_mysql module (http://forums.facepunchstudios.com/s...d.php?t=241247)
:siren: This does NOT create a huge chat room with every server running it, nor does it replace normal chat. This is an optional global chat (Used by typing /g <message> by default) used between either multiple servers you own, or between you and other G-mod servers of your choice :siren:
Extract the globalchat folder to garrysmod \ addons
Navigate to and open the globalchat \ lua \ autorun \ server \ chat.lua file. You need to edit the MySQL data to your database, and other variables as shown below:
The table structure is found in the chat.lua file or here:
-- Variables --
local serverName = "Server X" --Name of the server to be displayed in the chat
local trigger = "/g" --Trigger to send the global chat
local antiflood = 30 --How often a client can send a global chat (0 to disable, NOT reccomended)
-- MySQL Variables --
local host = "localhost" --Host address
local user = "username" --MySQL Username
local pass = "password" --MySQL Password
local database = "chat" --Database used to store the chat table
local port = 3306 --Port to connect to
local persistent = true --Use a persistant MySQL connection?
local updatetime = 30 --In Seconds, how often to get messages from the MySQL
local cleantime = 10 --In MINUTES, how often to delete all records from MySQL table (To prevent the table from growing too large)
Not too much to take a screenshot of..
contrasting local to global chat
Current version: 1.0.1
[list][*] Version 1.0.1 Fixed messages not outputting when another server clears the table[*] Version 1.0 Fixed small problem with the substring not calculating for a longer trigger (More characters that is) [*] Version 1.0 first release[/list]
I use MySQL as opposed to sockets to do the communication between servers for ease and expandability. Instead of having to edit the file in every server when adding another, the new server simply has to connect to the existing MySQL database. (And well, to be honest, I don't know where to start with sockets)
:siren: Please report any bugs here :siren: