Hi all,
Need a double IP-blocker please !!
Best regrads, nErBoS
don't know who wrote this:
but here you go
botname = "DoubleKick"
ip={}
oAllow={}
function Main()
oAllow["127.0.0.1"]=1 --Just an example;)
end
function NewUserConnected(user)
theIP=user.sIP
local a,b,c,d=splittip(theIP)
if ip[user.sIP] == nil then
ip[user.sIP]=user.sIP
elseif ((oAllow[a]==1)or(oAllow[b]==1)or(oAllow[c]==1)or(oAllow[d]==1)) then
else
user:Kick("No doubles allowed!!!")
end
end
function UserDisconnected(user)
ip[user.sIP]=nil
end
function splittip(IP)
r,g,a,b,c,d = strfind(IP, "(%d*).(%d*).(%d*).(%d*)")
d=a.."."..b.."."..c.."."..d
c=a.."."..b.."."..c..".*"
b=a.."."..b..".*"
a=a..".*"
return a,b,c,d
end
Dont know how this script works but there is some ppl who got 2 computers on the same ip so it would be smart to also check the share together with the ip.
Ron