diff --git a/MainModule/Client/UI/Default/Profile.luau b/MainModule/Client/UI/Default/Profile.luau index b1105632b..1abefa180 100644 --- a/MainModule/Client/UI/Default/Profile.luau +++ b/MainModule/Client/UI/Default/Profile.luau @@ -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); } @@ -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; @@ -467,4 +478,4 @@ return function(data, env) else gametab:Disable() end -end +end \ No newline at end of file diff --git a/MainModule/Server/Commands/Admins.luau b/MainModule/Server/Commands/Admins.luau index dd10d2f70..fae7da28a 100644 --- a/MainModule/Server/Commands/Admins.luau +++ b/MainModule/Server/Commands/Admins.luau @@ -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 diff --git a/MainModule/Server/Commands/Donors.luau b/MainModule/Server/Commands/Donors.luau index bdf434c22..855c5603f 100644 --- a/MainModule/Server/Commands/Donors.luau +++ b/MainModule/Server/Commands/Donors.luau @@ -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 \ No newline at end of file +end diff --git a/MainModule/Server/Commands/HeadAdmins.luau b/MainModule/Server/Commands/HeadAdmins.luau index acddf436f..b1dea981c 100644 --- a/MainModule/Server/Commands/HeadAdmins.luau +++ b/MainModule/Server/Commands/HeadAdmins.luau @@ -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} @@ -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} diff --git a/MainModule/Server/Core/Functions.luau b/MainModule/Server/Core/Functions.luau index 3cfb23da8..5f3b0d3d8 100644 --- a/MainModule/Server/Core/Functions.luau +++ b/MainModule/Server/Core/Functions.luau @@ -1337,7 +1337,7 @@ return function(Vargs, GetEnv) table.insert(tab,result) end end - + return tab end; @@ -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) @@ -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) diff --git a/MainModule/Server/Shared/Changelog.luau b/MainModule/Server/Shared/Changelog.luau index d67eb8977..9ede01a5c 100644 --- a/MainModule/Server/Shared/Changelog.luau +++ b/MainModule/Server/Shared/Changelog.luau @@ -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)"; @@ -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)";