Skip to content

Commit

Permalink
Merge branch 'Epix-Incorporated:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Expertcoderz authored Jan 11, 2025
2 parents be4b279 + f93b711 commit bc70df2
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 33 deletions.
33 changes: 22 additions & 11 deletions MainModule/Client/UI/Default/Profile.luau
Original file line number Diff line number Diff line change
Expand Up @@ -162,29 +162,40 @@ return function(data, env)
window:Ready()

do --// Friends Tab
local function pagesToTable(pages)
local items = {}
while true do
table.insert(items, pages:GetCurrentPage())
if pages.IsFinished then
break
end
pages:AdvanceToNextPageAsync()
end
return items
end
local function iterPageItems(pages)
local contents = pagesToTable(pages)
local pagenum = 1
local lastpagenum = #contents
return coroutine.wrap(function()
local pagenum = 1
while true do
for _, item in ipairs(pages:GetCurrentPage()) do
while pagenum <= lastpagenum do
for _, item in ipairs(contents[pagenum]) do
coroutine.yield(item, pagenum)
end
if pages.IsFinished then
break
end
pages:AdvanceToNextPageAsync()

pagenum += 1
end
end)
end

local LOCATION_TYPE = {"Mobile Website", "Mobile InGame", "Webpage", "Studio", "InGame", "Xbox", "Team Create"}
local LOCATION_TYPE = {"Mobile Website", "Mobile In-Game", "Webpage", "Studio", "In-Game", "Xbox", "Team Create"}
local ACTIVITY_COLOR_CODES = {
["Mobile Website"] = Color3.fromRGB(50, 140, 231);
["Mobile InGame"] = Color3.fromRGB(55, 200, 55);
["Mobile In-Game"] = Color3.fromRGB(55, 200, 55);
["Webpage"] = Color3.fromRGB(50, 140, 231);
["Studio"] = Color3.fromRGB(231, 112, 0);
["InGame"] = Color3.fromRGB(55, 200, 55);
["In-Game"] = Color3.fromRGB(55, 200, 55);
["Xbox"] = Color3.fromRGB(127, 0, 127);
["Team Create"] = Color3.fromRGB(231, 112, 0);
}
Expand All @@ -210,7 +221,7 @@ return function(data, env)
Routine(function()
for item, pageNo in iterPageItems(friendPages) do
table.insert(sortedFriends, item.Username)
local userId = item.id
local userId = item.Id
local activity = onlineFriends[userId]
friendInfoRef[item.Username] = {
id = userId;
Expand Down Expand Up @@ -467,4 +478,4 @@ return function(data, env)
else
gametab:Disable()
end
end
end
2 changes: 1 addition & 1 deletion MainModule/Server/Commands/Admins.luau
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ return function(Vargs, env)
UseFakePlayer = true;
})
do
if Admin.RemoveBan(v.Name) then
if Admin.RemoveBan(v) then
Functions.LogAdminAction(plr, "Unban", v.Name, "User has been unbanned.")
Functions.Hint(`{service.FormatPlayer(v, true)} has been unbanned`, {plr})
else
Expand Down
16 changes: 1 addition & 15 deletions MainModule/Server/Commands/Donors.luau
Original file line number Diff line number Diff line change
Expand Up @@ -390,19 +390,5 @@ return function(Vargs, env)
end
};

DonorSit = {
Prefix = Settings.PlayerPrefix;
Commands = {"sit"};
Args = {};
Description = "Makes your character sit";
Donors = true;
AdminLevel = "Players";
Function = function(plr: Player, args: {string})
local humanoid = plr.Character and plr.Character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Sit = true
end
end
};
}
end
end
4 changes: 2 additions & 2 deletions MainModule/Server/Commands/HeadAdmins.luau
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ return function(Vargs, env)
do
Functions.LogAdminAction(plr, "Un-Time Ban", v.Name, "Removed from timeban list")
Functions.Hint(
if Admin.RemoveTimeBan(v.Name)
if Admin.RemoveTimeBan(v)
then `{service.FormatPlayer(v, true)} has been un-time-banned`
else `{service.FormatPlayer(v, true)} is not currently time-banned`,
{plr}
Expand Down Expand Up @@ -153,7 +153,7 @@ return function(Vargs, env)
do
Functions.LogAdminAction(plr, "Unbanned", v.Name, "N/A")
Functions.Hint(
if Admin.RemoveBan(v.Name, true)
if Admin.RemoveBan(v, true)
then `{service.FormatPlayer(v, true)} has been unbanned from the game`
else `{service.FormatPlayer(v, true)} is not currently banned`,
{plr}
Expand Down
14 changes: 11 additions & 3 deletions MainModule/Server/Core/Functions.luau
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ return function(Vargs, GetEnv)
table.insert(tab,result)
end
end

return tab
end;

Expand Down Expand Up @@ -1405,7 +1405,11 @@ return function(Vargs, GetEnv)
return AllGrabbedPlayers
end;

GetUserIdFromNameAsync = function(name)
GetUserIdFromNameAsync = function(name: string | Player)
if type(name) == "userdata" and name:IsA("Player") then
return name.UserId
end

local cache = Admin.UserIdCache[name]
if not cache then
local success, UserId = pcall(service.Players.GetUserIdFromNameAsync, service.Players, name)
Expand All @@ -1419,7 +1423,11 @@ return function(Vargs, GetEnv)
return cache
end;

GetNameFromUserIdAsync = function(id)
GetNameFromUserIdAsync = function(id: number | Player)
if type(id) == "userdata" and id:IsA("Player") then
return id.Name
end

local cache = Admin.UsernameCache[id]
if not cache then
local success, Username = pcall(service.Players.GetNameFromUserIdAsync, service.Players, id)
Expand Down
3 changes: 2 additions & 1 deletion MainModule/Server/Shared/Changelog.luau
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ return {
"";
"[v262 2025-01-03 12:35 UTC] @Dimenpsyonal";
"*First update of 2025 (!!!)";
"(Git/TheSkout001) Add donor !sit command (#1776)";
"(Git/fxeP1) Attempt to fix unbanning on changed player names (#1819)";
"(Git/WalkerOfBacon) Add a way to define cameras in settings (#1777)";
"(Git/WalkerOfBacon) Allow team names with spaced to be created via :teams (#1778)";
"(Git/WalkerOfBacon) Add R15 support for :dog (#1781)";
Expand All @@ -21,6 +21,7 @@ return {
"(Git/fxeP1) Fix BrickColor typo inside sing command (#1811)";
"(Git/fxeP1) Fixed TextBox capability warning (#1812)";
"(Git/NoobBucket) Fix ServerNewDex not logging correctly (#1814)";
"(Git/ScriptedConnor) Fixed friends tab on the !profile command (#1821)";
"";
"[Patch v261.3 2024-12-30 16:46 UTC] @Dimenpsyonal";
"Fix trello erroring instead of warning (#1805)";
Expand Down

0 comments on commit bc70df2

Please sign in to comment.