--Requested by blackwings
--Made by nErBoS
--lua 5 by Dessamator
sBot = "Bad Password Cleaner"
fPermBan = "../PermBan.dat"
arrAux = {}
sec = 1000
min = 60*sec
hour = 60*min
iTime = 15*min-- Checking Time
function Main()
frmHub:RegBot(sBot)
SetTimer(iTime)
StartTimer()
end
function OnTimer()
CheckForBan()
CleanBan()
end
function CheckForBan()
local file = io.input(fPermBan)
for sLine in file:lines() do
if (sLine == nil) then
break
else
local s,e,ip,reason = string.find(sLine, "(%S+)|(%S+%s+%S+%s+%S+)")
if (ip ~= nil and reason ~= nil and reason == "3x bad password") then
arrAux[ip] = 1
end
end
end
file:close()
end
function CleanBan()
local ip,aux
for ip, aux in arrAux do
Unban(ip)
end
end
dont work whit ptoka server 0.3.3.0 build 16.06
error
)
Syntax \scripts\passwordcleaner.lua:25: bad argument #1 to `input' (../PermBan.dat: Permission denied
)
check the Lua 5 script database at
http://ptokaxscripts.sytes.net
Typhoon?
yaps i had fixed that error before, but i think i was kinda tired when i posted that, :D, error corrected, post edited up there, or u can,
Quotecheck the Lua 5 script database at http://ptokaxscripts.sytes.net Typhoon
more specifically::
Quotehttp://ptokaxscripts.sytes.net/e107_files/public/baddpassbanremover.lua