Skip to content

Commit b21ae34

Browse files
Update logic for multiple commands & Cross_Server module (#1874)
* Fix spelling error in API.luau * Fix global shutdown * Update Cross_Server.luau * finishing touches * convert quotes to doubles * fix GlobalSoftShutdown usage * update trello api * oops * revert 2 old msg * better messages * better messages * Fix typo in CONTRIBUTING.md * aaa * revert * testing signing * yeah * change !abortrestart * fix possible error * display reason * fix countdown number * revert if change * add reason to formatted msg * update AddLog & :restart * use functions.message() * i forgot * wait until client is ready before sending msg * use ceil instead of floor & fix desc clipping * fix desc in transblack theme * add backwards compatibility * fix compatibility * fix conflicts --------- Co-authored-by: nichole <[email protected]>
1 parent 3a47259 commit b21ae34

File tree

8 files changed

+156
-179
lines changed

8 files changed

+156
-179
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
Adonis is an ever-expanding, frequently updated, and sometimes complex system.
88
To keep Adonis functional and somewhat readable rather than a tangled mess, this document sets out the policies governing contributions to consider before submitting a pull request:
99

10-
</div>
11-
1210
## 1. Governance
1311

1412
- Pull requests (PRs) are reviewed and approved by [@Sceleratis](https://github.com/Sceleratis) or any of the appointed community maintainers:

MainModule/Client/UI/Default/Window.rbxmx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ return function(data, env)
10631063
local maxWidth = 400
10641064
local bounds = service.TextService:GetTextSize(sizeText, label.TextSize, label.Font, Vector2.new(maxWidth, math.huge))
10651065

1066-
local sizeX, sizeY = bounds.X + 10, bounds.Y + 10
1066+
local sizeX, sizeY = bounds.X + 11, bounds.Y + 11
10671067
local posX = (x + 6 + sizeX) < GUI.AbsoluteSize.X and (x + 6) or (x - 6 - sizeX)
10681068
local posY = (y - 6 - sizeY) > 0 and (y - 6 - sizeY) or (y)
10691069

MainModule/Client/UI/TransBlack/Window.rbxmx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ return function(data, env)
11761176
local maxWidth = 400
11771177
local bounds = service.TextService:GetTextSize(sizeText, label.TextSize, label.Font, Vector2.new(maxWidth, math.huge))
11781178

1179-
local sizeX, sizeY = bounds.X + 10, bounds.Y + 10
1179+
local sizeX, sizeY = bounds.X + 11, bounds.Y + 11
11801180
local posX = (x + 6 + sizeX) < GUI.AbsoluteSize.X and (x + 6) or (x - 6 - sizeX)
11811181
local posY = (y - 6 - sizeY) > 0 and (y - 6 - sizeY) or (y)
11821182

MainModule/Server/Commands/Moderators.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ return function(Vargs, env)
411411
if typeof(v) == "Instance" then
412412
v:Kick(string.format("\n[Warning from %s]\nReason: %s", service.FormatPlayer(plr), reason))
413413
else
414-
Core.CrossServer("RemovePlayer", v.Name, `Warning from {service.FormatPlayer(plr)}`, reason)
414+
Core.CrossServer("RemovePlayer", tonumber(v.UserId), `Warning from {service.FormatPlayer(plr)}`, reason)
415415
end
416416

417417
Functions.Notification("Notification", `Kick-warned {service.FormatPlayer(v)}`, {plr}, 5, "MatIcons://Shield", Core.Bytecode(`client.Remote.Send('ProcessCommand','{Functions.GetMainPrefix()}warnings {v.Name}')`))

MainModule/Server/Core/Admin.luau

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ return function(Vargs, GetEnv)
970970
Value = value;
971971
})
972972

973-
Core.CrossServer("RemovePlayer", p.Name, Variables.BanMessage, value.Reason or "No reason provided")
973+
Core.CrossServer("RemovePlayer", tonumber(p.UserId), Variables.BanMessage, value.Reason or "No reason provided")
974974
end
975975

976976
if type(p) ~= "table" then
@@ -1001,7 +1001,7 @@ return function(Vargs, GetEnv)
10011001
Value = value;
10021002
})
10031003

1004-
Core.CrossServer("RemovePlayer", p.Name, Variables.BanMessage, value.Reason or "No reason provided")
1004+
Core.CrossServer("RemovePlayer", tonumber(p.UserId), Variables.BanMessage, value.Reason or "No reason provided")
10051005

10061006
if type(p) ~= "table" then
10071007
if not service.Players:FindFirstChild(p.Name) then

MainModule/Server/Dependencies/TrelloAPI.luau

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
-- It is requested that existing credits remain here. --
1010
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1111

12-
local print = function(...) warn("[Adonis TrelloAPI]: INFO:", ...) end
13-
local error = function(...) warn("[Adonis TrelloAPI]: ERROR:", ...) end
14-
local warn = function(...) warn("[Adonis TrelloAPI]: WARN:", ...) end
12+
local print = function(...)
13+
print(":: Adonis ::", ...)
14+
end
15+
16+
local warn = function(...)
17+
warn(":: Adonis ::", ...)
18+
end
1519

1620
local HttpService = game:GetService("HttpService")
1721
local Weeks = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
@@ -23,7 +27,7 @@ local WaitTime = 10
2327

2428
local RateLimit = function()
2529
if Requests >= MaxRequests then
26-
warn("Trello RateLimit Reached! Waiting 10 seconds...")
30+
warn("Trello rate limit reached! Waiting "..WaitTime.." seconds...")
2731
task.wait(WaitTime)
2832
Requests = 0
2933
end
@@ -90,7 +94,7 @@ local HttpFunctions; HttpFunctions = {
9094
if ran then
9195
return response
9296
else
93-
warn(`RequestAsync failed: {response}`)
97+
warn(`Trello RequestAsync failed: {response}`)
9498
return false
9599
end
96100
end;
@@ -108,7 +112,7 @@ local HttpFunctions; HttpFunctions = {
108112
if ran then
109113
return response
110114
else
111-
warn(`GetAsync failed: {response}`)
115+
warn(`Trello GetAsync failed: {response}`)
112116
return false
113117
end
114118
end;
@@ -126,17 +130,17 @@ local HttpFunctions; HttpFunctions = {
126130
if ran then
127131
return response
128132
else
129-
warn(`PostAsync failed: {response}`)
133+
warn(`Trello PostAsync failed: {response}`)
130134
return false
131135
end
132136
end;
133137

134138
Trim = function(str)
135139
return string.match(str, "^%s*(.-)%s*$")
136140
end;
137-
141+
138142
GetListObject = function(Lists, Name)
139-
if not Name then error("Missing search term") end
143+
if not Name then warn("No search term for GetListObject() (Trello)") end
140144
for _, List in Lists do
141145
if type(Name)=="table" then
142146
for _, Name in Name do
@@ -177,15 +181,13 @@ return function(AppKey, Token)
177181
return enabled
178182
end;
179183

180-
local HttpEnabled = pcall(HttpService.GetAsync, HttpService, "http://www.google.com/robots.txt");
181-
182-
if not HttpEnabled then
183-
error("Unable to connect to trello, Http requests are not enabled. Enable them via game settings.")
184+
if not HttpService.HttpEnabled then -- https://devforum.roblox.com/t/allow-scripts-to-access-httpenabled/73975/
185+
warn("Unable to connect to trello, Http requests are not enabled. Enable them via game settings.")
184186
return
185-
end
186-
187+
end;
188+
187189
if not CheckHttp() then
188-
error("Could not connect to Trello! Please check if your app-key/token are valid.")
190+
warn("Unable to connect to trello. Please check if your app key and token are valid.")
189191
return
190192
end;
191193

0 commit comments

Comments
 (0)