-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsv_config.lua
More file actions
111 lines (102 loc) · 1.75 KB
/
Copy pathsv_config.lua
File metadata and controls
111 lines (102 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-- Server Configuration
local ServerConfig = {
ID = os.time(),
Name = "Server Name",
Access = GetConvar("sv_access_role", 0),
}
-- Discord Configuration
local DiscordConfig = {
Server = "",
}
-- Groups Configuration
local GroupsConfig = {
management = {
Id = "management",
Name = "Management",
Abv = "Management",
Queue = {
Priority = 100,
},
Permission = {
Group = "admin", -- Can restart resources
Level = 100,
},
},
dev = {
Id = "dev",
Name = "Developer",
Abv = "Dev",
Queue = {
Priority = 50,
},
Permission = {
Group = "admin",
Level = 100,
},
},
admin = {
Id = "admin",
Name = "Admin",
Abv = "Admin",
Queue = {
Priority = 50,
},
Permission = {
Group = "staff",
Level = 50,
},
},
operations = {
Id = "operations",
Name = "Operations",
Abv = "Operations",
Queue = {
Priority = 50,
},
Permission = {
Group = "",
Level = 0,
},
},
whitelisted = {
Id = "whitelisted",
Name = "Whitelisted",
Abv = "Whitelisted",
Queue = {
Priority = 0,
},
Permission = {
Group = "",
Level = 0,
},
},
}
exports("ConfigGetDiscord", function()
return DiscordConfig
end)
exports("ConfigGetGroups", function()
return GroupsConfig
end)
exports("ConfigGetServer", function()
return ServerConfig
end)
exports("ConfigGetGroupById", function(groupId)
return GroupsConfig[groupId]
end)
exports("ConfigGetGroupPermission", function(groupId)
local group = GroupsConfig[groupId]
if group then
return group.Permission
end
return nil
end)
exports("ConfigGetGroupQueuePriority", function(groupId)
local group = GroupsConfig[groupId]
if group then
return group.Queue.Priority
end
return 0
end)
exports("ConfigUpdateGroups", function(newGroups)
GroupsConfig = newGroups
end)