I want to unban who banned last. For example i banned Player2. But it was wrong player. i will type "!remove" then
Only him ban will be remove. Thanks for your helps
Scripts
Wrong Ban (lua)
Wrong Ban (lua)
1

limonata has written
limonata has writtenfunction string.split(str,pat)
local t = {}
	for word in string.gmatch(str,pat or "[^%s]+") do
		t[#t+1] = word
	end
	return t
end
addhook("say","stuff")
function stuff(id,txt)
local words = txt:split()
	if player(id,"rcon") then
		if words[1]=="!banip" then
			if words[2] then
				parse("banip "..words[2])
				return 1
				local storedip = words[2]
			else
				msg2(id,"Invalid parameters!")
			end
		elseif words[1]=="!remove" then
			parse("unban "..storedip)
			return 1
		end
	end
end
If player has entered rcon
If he wrote in chat !banip AND ip of the player he wants to ban
Last IP should be stored.
If player who has entered rcon says "!remove" then the last stored IP should be unbanned.if player(id,"rcon")
if player(id,"usgn")==YOURUSGN
Rainoth: latest_ban = {[0] => {"id"=>#USGN_ID_HERE,"user"=>"Player",...}}
KimKat: I couldnt understand what did u mean?
1
