Jump to content

How to cancel banishment using console?


Recommended Posts

13 minutes ago, __orange said:

We have a steam group and several admins. One admin banished a player by mistake. Is there any way to cancel it without editing the black list file? The host is too busy to deal with it.

Ehh I'm pretty sure you can... but it'd require an extensive command I'm currently trying to figure out. It requires at least these two commands run in a function,

TheNet:GetBlacklist()
TheNet:SetBlacklist()

for @Electroely and others so you're going to need to make a table with the command and remove from the table using

table.remove(somevariablethatyousettolinkto"TheNet:GetBlacklist", KleiUIDinstring?)

make an other list for some reason?

local newlist = {}
for i,v in pairs(thevariablethatimentionedbefore) do
	if v and not v.empty then
		table.insert(newlist, v)
	end
end

then set the blacklist to the modified table using

TheNet:SetBlacklist(newlist)

I took this info from the bantab.lua that I've attached

bantab.lua

Link to comment
Share on other sites

1 minute ago, ThemInspectors said:

Ehh I'm pretty sure you can... but it'd require an extensive command I'm currently trying to figure out.

......

I took this info from the bantab.lua that I've attached

bantab.lua

Thank you. I will try this later.

Link to comment
Share on other sites

@__orange I found a way to unban a player, although due to how Bans in DST are structured you need to have some before-hand knowledge of who was banned recently, you need to know EXACTLY how many people were banned after the person. Once done, run these commands:

list1 = TheNet:GetBlacklist
for k,v in pairs(list1) do print(k,v) end

you should get something like this:

1. table XXXXXX
2. table XXXXXX
....
34. table XXXXXX

pick the last number, it shows how many total people have been banned, take that number and take away how many people have been banned AFTER the person so if there were 268 entries and 5 people after were banned do 268 - 5.

you're now going to need edit the banlist and set it run this:

table.remove(list1, xx)
TheNet:SetBlacklist(list1)

replace xx with the number that you got before.

Hopefully that works, if it doesn't you might have unbanned someone else.

 

Link to comment
Share on other sites

9 hours ago, ThemInspectors said:

@__orange I found a way to unban a player, although due to how Bans in DST are structured you need to have some before-hand knowledge of who was banned recently, you need to know EXACTLY how many people were banned after the person. Once done, run these commands:


list1 = TheNet:GetBlacklist
for k,v in pairs(list1) do print(k,v) end

you should get something like this:


1. table XXXXXX
2. table XXXXXX
....
34. table XXXXXX

pick the last number, it shows how many total people have been banned, take that number and take away how many people have been banned AFTER the person so if there were 268 entries and 5 people after were banned do 268 - 5.

you're now going to need edit the banlist and set it run this:


table.remove(list1, xx)
TheNet:SetBlacklist(list1)

replace xx with the number that you got before.

Hopefully that works, if it doesn't you might have unbanned someone else.

 

I must add:

You can check for the banned person's name or KU ID by typing

print(list1[NumberOfBannedPersonOnTheList].netprofilename)

or

print(list1[NumberOfBannedPersonOnTheList].userid)

The first one will print the banned person's name into console, and the second one will print the banned person's KU ID.

These will only work after executing ThemInspector's first command.

 

So if you want to check banned player number 3's name (from the list ThemInspector's command makes), you'll type

print(list1[3].netprofilename)

This should be helpful along with ThemInspector's instructions (which I was going to post here...).

EDIT:

list1 = TheNet:GetBlacklist
for k,v in pairs(list1) do print(k,v, v.netprofilename) end

Use this command to list the banned players WITH the name as part of the list.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...