Skip to content

Commit cd7e7ca

Browse files
Merge pull request #9 from Aperture-Development/development
Current development progress to bugfix
2 parents 40856ff + a9193c6 commit cd7e7ca

21 files changed

+522
-17
lines changed

README.md

Lines changed: 97 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# MSync-2
22

3-
Why version 2?
3+
![BuildStatus](https://tcci.aperture-development.de/app/rest/builds/buildType:(id:MSync2_BuildTestPublish)/statusIcon.svg)
4+
[![Issues](https://img.shields.io/github/issues-raw/Aperture-Development/MSync-2.svg)](https://github.com/Aperture-Development/MSync-2/issues)
5+
[![Chat](https://img.shields.io/discord/272563407209889792.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/JpDPa6w)
6+
![Size](https://img.shields.io/github/repo-size/Aperture-Development/MSync-2.svg)
7+
[![Licence](https://img.shields.io/badge/license-by--nc--sa--4.0-green.svg)](https://github.com/Aperture-Development/MSync-2/blob/master/LICENSE)
8+
[![Release](https://img.shields.io/github/release/Aperture-Development/MSync-2.svg)](https://github.com/Aperture-Development/MSync-2/releases)
9+
10+
What is MSync-2 ?
11+
12+
MSync is a all around GMod server synchronisation addon. The addon is and will always be free to use.
13+
14+
MSync 2 is a new version of https://github.com/Aperture-Development/MSync
15+
16+
It requires [MySQLoo](https://github.com/FredyH/MySQLOO) to work.
17+
18+
**Why version 2?**
419

520
Let's be honest here, version one is a broken piece of shit. It errors out everywhere, the GUI does not work and when you remove it, all bans and stuff are lost, because we overwrite the origiinal commands.
621

@@ -20,23 +35,99 @@ MSync 2 is Split up in 3 versions:
2035
- CHEESE
2136
- STEAK
2237

23-
EGG is the WIP addon which does not work yet at all. DO NOT USE ANYTHING OF THIS! The file structure will change propably. If you have problems with a EGG version, we do not Provide support. Use the STEAK version or at least CHEESE.
38+
**EGG** is the WIP addon which does not work yet at all. DO NOT USE ANYTHING OF THIS! The file structure will change propably. If you have problems with a EGG version, we do not Provide support. Use the STEAK version or at least CHEESE.
2439

25-
CHEESE is the beta phase of the addon. The addon works, but has propably bugs everywhere that needs to be found yet. If you have errors whith this version, please inform us with a GitHub issue or over our ticketsystem: [https://www.Aperture-Development.de/ticketsystem](https://www.Aperture-Development.de/ticketsystem)
40+
**CHEESE** is the beta phase of the addon. The addon works, but has propably bugs everywhere that needs to be found yet. If you have errors whith this version, please inform us with a GitHub issue or over our ticketsystem: [https://www.Aperture-Development.de/ticketsystem](https://www.Aperture-Development.de/ticketsystem)
2641

27-
STEAK is the stable version of MSync 2. This version is safe to be used on your server.
42+
**STEAK** is the stable version of MSync 2. This version is safe to be used on your server.
2843

29-
Why do all versions are named after food?
44+
**Why do all versions are named after food?**
3045

3146
Because it's a joke, as you maybe know, Debian distributions are named after the characters of Toy Story, and I thought its funny to have something like that for our Addons.
3247

3348
# A note to modules
3449

3550
If you plan on extending the features of MSync 2, please copy and use the samplemodule files. You can distribute the Module under every licence you like. We always use the root_dir/LICENCE which is basicly the Licence you get the addon with. If you download it from GitHub or Steam it will most likely be under the by-nc-sa 4.0 licence, while when you download it over our website, you will get the Aperture Development Commercial licence.
3651

52+
# Installation
53+
54+
You need to install some things manually on the Server in order for MSync to work.
55+
56+
First you need libmysql on windows or libmysqlclient on linux. You can find them here:
57+
Windows: https://github.com/FredyH/MySQLOO/raw/master/MySQL/lib/windows/libmysql.dll
58+
Linux: https://github.com/FredyH/MySQLOO/raw/master/MySQL/lib/linux/libmysqlclient.so.18
59+
Put the file in the same folder where your scrds.exe or your scrds_linux file is.
60+
61+
Then you need MySQLoo 9 or higher. You can download MySQLoo from here:
62+
https://github.com/FredyH/MySQLOO/releases
63+
Select win32 if your server runs on windows, otherwise use the linux dll.
64+
Put the dll file in your lua/bin folder. If you don't have one, create it.
65+
it should look like this:
66+
67+
```
68+
bin
69+
garrysmod
70+
->lua
71+
-->bin
72+
--->gmsv_mysql_<version>.dll
73+
```
74+
75+
After that just install the addon by putting it in your servers workshop collection or download the zip file from github and put the folder in your servers addon folder:
76+
https://github.com/Aperture-Development/MSync-2/archive/master.zip
77+
78+
When the server is started, everything should be ready for MSync 2. You can access the admin gui using "!msync"
79+
80+
# Features
81+
82+
**Server Groups:**
83+
84+
>Server groups allow you to group your servers in sub teams. Modules will just sync things that are explicity told to sync it across all servers, otherwise it will just sync it with servers that have the same server group.
85+
86+
87+
**MRSync:**
88+
89+
>**M**ySQL **R**ank **Sync**hronisation
90+
>
91+
>MRSync allows you to synchronise your staff team across your servers without the need to add/remove a staff member on every server. Just add a user to a rank and he will also have the rank on all other servers. For now it is important that the ranks you synchronise also exist on all servers.
92+
>
93+
>You want some ranks to not be synced?
94+
There is a rank blacklist for ranks that dont get saved to the database. Just add the rank and you are good to go.
95+
>
96+
>You want some ranks to be synced across all servers and some just for ( as example ) your DarkRP servers?
97+
The server_group option allows you to do just that. Just sub-categorise your servers and your ranks now just get synced within this group. You can exclude ranks from that rule and force them to synchronise across all servers using the allserver table, all ranks in that table get saved as ranks for the whole network.
98+
99+
100+
**MBSync:**
101+
102+
>**M**ySQL **B**an **Sync**hronisation
103+
>
104+
>MBSync allos you to synchronise your bans across all servers ( network bans ). This Module is also server_group bound, means when you ban a user on a server in the group darkrp they dont get banned on servers with a different group.
105+
>
106+
>Commands:
107+
>
108+
>!mban - Opens ban GUI
109+
>
110+
>!mban [Name] [Length] [global] [Reason] - bans a player
111+
>
112+
>!mbanid [SteamID/SteamID64] [Length] [global] [Reason] - bans a players steamid
113+
>
114+
>!munban [SteamID/SteamID64] - unbans a player
115+
>
116+
>!mbsync - Opens Ban list
117+
118+
119+
**Planned Features**
120+
121+
>- UTime synchronisation - Codename: MUSync
122+
>- MySQL Warning system - Codename: MWS
123+
>- Permission synchronisation - Codename: MPSync
124+
>- MSync synchronisation - Codename: MSSync
125+
126+
127+
37128
# Other info
38129

39130
MSync 2 - GitHub is distributed under the by-nc-sa 4.0 Int licence. Please read the LICENCE file in the root directory of MSync 2.
40131

41132
Support is provided over our ticketsystem:
42-
[https://www.Aperture-Development.de/ticketsystem](https://www.Aperture-Development.de/ticketsystem)
133+
[https://www.Aperture-Development.de/ticketsystem](https://www.Aperture-Development.de/ticketsystem)

addon.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"*.psd",
88
"*.vcproj",
99
"*.svn*",
10-
"*samplemodule.lua"
10+
"*samplemodule.lua",
11+
"LICENSE",
12+
"README.md",
13+
"database.sql",
14+
".git/*",
15+
".git"
1116
]
1217
}

database.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ CREATE TABLE IF NOT EXISTS `tbl_mbsync` (
4141
`date_unix` float NOT NULL,
4242
`lenght_unix` float NOT NULL,
4343
`server_group` INT UNSIGNED NOT NULL,
44+
`ban_lifted` INT UNSIGNED,
4445
FOREIGN KEY (server_group) REFERENCES tbl_server_grp(p_group_id),
4546
FOREIGN KEY (userid) REFERENCES tbl_users(p_user_id),
4647
FOREIGN KEY (adminid) REFERENCES tbl_users(p_user_id)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
MSync = MSync or {}
2+
MSync.modules = MSync.modules or {}
3+
MSync.modules.MBSync = MSync.modules.SampleModule or {}
4+
--[[
5+
* @file cl_samplemodule.lua
6+
* @package Sample Module
7+
* @author Aperture Development
8+
* @license root_dir/LICENCE
9+
* @version 1.0.0
10+
]]
11+
12+
--[[
13+
Define name, description and module identifier
14+
]]
15+
MSync.modules.MBSync.info = {
16+
Name = "MySQL Ban Sync",
17+
ModuleIdentifier = "MBSync",
18+
Description = "Synchronise band across your servers",
19+
Version = "0.0.1"
20+
}
21+
22+
--[[
23+
Define additional functions that are later used
24+
]]
25+
function MSync.modules.MBSync.init()
26+
27+
function MSync.modules.SampleModule.SampleFunction()
28+
return true
29+
end
30+
31+
end
32+
33+
--[[
34+
Define the admin panel for the settings
35+
]]
36+
function MSync.modules.MBSync.adminPanel(sheet)
37+
local pnl = vgui.Create( "DPanel", sheet )
38+
pnl:Dock(FILL)
39+
return pnl
40+
end
41+
42+
--[[
43+
Define the client panel for client usage ( or as example: use it as additional admin gui which does not need msync.admingui permission)
44+
]]
45+
function MSync.modules.MBSync.clientPanel()
46+
local pnl = vgui.Create( "DPanel" )
47+
48+
return pnl
49+
end
50+
51+
--[[
52+
Define net receivers and util.AddNetworkString
53+
]]
54+
function MSync.modules.MBSync.net()
55+
net.Receive( "my_message", function( len, pl )
56+
if ( IsValid( pl ) and pl:IsPlayer() ) then
57+
print( "Message from " .. pl:Nick() .. " received. Its length is " .. len .. "." )
58+
else
59+
print( "Message from server received. Its length is " .. len .. "." )
60+
end
61+
end )
62+
end
63+
64+
--[[
65+
Define ulx Commands and overwrite common ulx functions (module does not get loaded until ulx has fully been loaded)
66+
]]
67+
function MSync.modules.MBSync.ulx()
68+
69+
end
70+
71+
--[[
72+
Define hooks your module is listening on e.g. PlayerDisconnect
73+
]]
74+
function MSync.modules.MBSync.hooks()
75+
hook.Add("initialize", "msync_sampleModule_init", function()
76+
77+
end)
78+
end
79+
80+
--[[
81+
Return info ( Just for single module loading )
82+
]]
83+
return MSync.modules.MBSync.info
File renamed without changes.

0 commit comments

Comments
 (0)