Forum
Servers
remove ban
remove ban
5 replies
1

Edit the bans.lst in your sys folder.
In-game, press Esc > Players & Bans > Bans tab. Then Remove accordingly. Remove all bans:
unbanall and and write
please read FAQ before asking us any fucking stupid question !
I think you're already pressed on ''I searched but I didn't find any thing''
The following is a Lua script for CS2D servers that are running on Windows.
addhook("say", "on_say")
function on_say(p,txt)
	local srv=player(1,"exists")
	if (srv) then -- Detect the server admin.
		if (txt=="!bans del") then -- This removes the bans.
			os.execute("echo All bans removed. > sys/bans.lst")
			print "©102255102You have removed all the bans in ('sys/bans.lst')."
		elseif (txt=="!bans copy") then -- This makes a copy of the bans.
			os.execute('copy /Y sys/bans.lst "sys/bans.lst.backup"')
			print "©102255102You have copied the ('sys/bans.lst') and made a backup of it at ('sys/bans.lst.backup')."
		end
	else
		print "©250250075You do not have the privileges to perform this."
		msg2(p,"©250250075You do not have the privileges to perform this.@C")
	end
end Revised code. 
I added Linux version aswell, just to be "user-friendly" lol.
addhook("say", "on_say")
function on_say(p,txt)
	local srv=player(1,"exists")
	if (srv) then -- Detect the server admin.
		if (txt=="!bans del") then -- This removes the bans.
			os.execute('echo "All bans removed." > /sys/bans.lst')
			print "©102255102You have removed all the bans in ('/sys/bans.lst')."
		elseif (txt=="!bans copy") then -- This makes a copy of the bans.
			os.execute("cp /sys/bans.lst /sys/bans.lst.backup")
			print "©102255102You have copied the ('/sys/bans.lst') and made a backup of it at ('/sys/bans.lst.backup')."
		end
	else
		print "©250250075You do not have the privileges to perform this."
		msg2(p,"©250250075You do not have the privileges to perform this.@C")
	end
endedited 3×, last 07.10.12 01:58:05 pm
KimKat has writtenI have got a neat way to delete bans and have backups made.
The following is a Lua script for CS2D servers that are running on Windows.
The following is a Lua script for CS2D servers that are running on Windows.
addhook("say", "on_say")
function on_say(p,txt)
	if (txt=="!delete_bans") then
		os.execute("echo All bans removed. > sys/bans.lst")
	elseif (txt=="!copy_bans") then
		os.execute('copy /Y sys/bans.lst "sys/bans.lst.backup"')
	end
endI think you can use it without space..
so fix:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("say", "on_say")
function on_say(p,txt)
if (txt=="!delete bans") then
os.execute("echo All bans removed. > sys/bans.lst")
elseif (txt=="!copy bans") then
os.execute('copy /Y sys/bans.lst "sys/bans.lst.backup"')
end
end
1

Offline
