#user changed username and now cannot be unbanned

1 messages · Page 1 of 1 (latest)

toxic topaz
#

hi a user in my game was banned and they changed their username and now cannot be unbanned. We have used all the unban commands and tried the old usernames but nothing works.

toxic topaz
worthy garnet
#

Why do we still have this issue-

toxic topaz
#

i could scroll through ;adonissettings but it would literally take days since i have 5000+ bans

worthy garnet
#

Not even surprised

toxic topaz
#

my staff and me r looking for a command that will work but its looking pretty bad 😭

worthy garnet
#

And im assuming unbanning him via id doesn't work

#

?

toxic topaz
#

thats what we tried first

#

doesnt work

#

literal only way is ;adonissettings but it would take a day to find the ban

#

need a ban command that just overrides everything

lofty quarry
# toxic topaz hi a user in my game was banned and they changed their username and now cannot b...

let me know if you're able to run this inside :terminal:

loadstring local USER_ID = 76058770

local Core = server.Core
local Functions = server.Functions
local Banned = Core.GetData("SAVEDTABLE_Banned")
for index, action in ipairs(Banned) do
    if action.Type == "TableAdd" then
        local actionValue = action.Value
        local tabName = action.Table

        if
            (type(actionValue) == "table" and tonumber(actionValue.UserId) == USER_ID)
            or (type(actionValue) == "string" and tonumber(string.match(actionValue, ":(.*)")) == USER_ID)
        then
            local tab = Core.IndexPathToTable(tabName)
            local ind = Functions.GetIndex(tab, actionValue)
            if ind then
                table.remove(tab, ind)
            end

            Core.DoSave({
                Type = "TableRemove",
                Table = tabName,
                Value = actionValue,
            })

            print("removed data")
        end
    end
end

should look like this:

#

at the bottom of the log, let me know if it says "removed data"

potent coral
#

As a temporary solution, open :terminal and run loadstring server.Admin.RemoveBan({UserId = 76058770; name = "vqzrxz"}, true) to manually un-ban until I can put the fix into release

#

not sure why someone made it rely on name and not userid

toxic topaz
#

I’ll try it in a bit

potent coral
#

hold on making this that even works lmfao

#

this is a very badly written system in here, going to rewrite it out of spite

toxic topaz
#

💀

potent coral
#

someone reorganized a bunch of this stuff a while ago and did a very lackluster job of testing it well

#

not sure why a maintainer even merged it in

toxic topaz
#

😔

potent coral
toxic topaz
#

Ok I’ll try

#

😟

potent coral
#

need to make RemoveBan take in the fake player system so it's easier to remove offline players instead of just passing a username (which CHANGES)

#

who in the hell makes it rely on a changeable part of players

toxic topaz
#

Can’t it just be based on user ID

potent coral
#

It can be

toxic topaz
#

Would make it easier Xd

potent coral
#

But whoever wrote this did it v.Name

#

not just v or v.UserId

toxic topaz
#

😔

frigid tree
#

not sure why a maintainer even merged it in

potent coral
#

🥹

toxic topaz
#

the fix he said doesnt do anything

#

😟

#

nvm i think it worked

potent coral
#

plus its only sending the name not userid

toxic topaz
#

it just didnt like say anytrhing happened

#

but the guy says hes unbanned

#

so

#

: P