hello all you fine scripters
here is my request
i would like to have a script that blocks [or kicks] users that are trying to use a hubfiller and are trying to enter the hub with more than 1 name on the same ip.
and logs the user and ip when he connect more than 5 times.
so something like this :
petr0
petr00
petr000
and i know you can use several hubfillers at the same time with diffrent names
and this goes on till hub crashes.
so what i need is a script that blocks a user with more than one name per IP pro login so that users with dynamic IP have no troublles getting in because there ip is changing evrytime.
i hope you can help me with this one
tia peter.
Hi,
Hope it helps...
--Requested by [NL]trucker
--Made by nErBoS
Bot = "Blocker2IP"
dip = {}
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user, data)
if (dip[user.sIP] == nil) then
dip[user.sIP] = 1
elseif (dip[user.sIP] == 1) then
user:SendPM(Bot, "You are already connected to the HUB with another nick.")
ip2 = 1
user:Disconnect()
end
end
function UserDisconnected(user, data)
if (ip2 == 1) then
dip[user.sIP] = 1
ip2 = 0
else
dip[user.sIP] = nil
ip2 = 0
end
end
Best regards, nErBoS
nerbos thnx
one request left.
to have the OPs and above excluded wich lines do i have to add?
and to log the user and ip when he connect more than 3 times.
Op's are already excluded in that script
Hi,
Here is it...
--Requested by [NL]trucker
--Made by nErBoS
Bot = "Blocker2IP"
dip = {}
counter = {}
diplogger = "dip.txt" --Will be created in the script folder
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user, data) --Like [NL]Pur said this function only work to Users, not Operators
if (counter[user.sIP] == nil) then
counter[user.sIP] = 0
end
if (counter[user.sIP] == 3) then
counter[user.sIP] = 0
appendto(diplogger)
write("\r\nThe IP "..user.sIP.." tried to enter with another nick 3 times.")
writeto()
end
if (dip[user.sIP] == nil) then
dip[user.sIP] = 1
elseif (dip[user.sIP] == 1) then
user:SendPM(Bot, "You are already connected to the HUB with another nick.")
ip2 = 1
counter[user.sIP] = counter[user.sIP] + 1
user:Disconnect()
end
end
function UserDisconnected(user, data)
if (ip2 == 1) then
dip[user.sIP] = 1
ip2 = 0
else
dip[user.sIP] = nil
ip2 = 0
end
end
Best regards, nErBoS
Nerbos
the first script isnt working
i had it tested with a user and he logged in twice and bot didnt recognised it
despite same name but with diffrent share and ( NL) instead of [NL]
going to test the second one .
thnx for answer Pur
Op's are already excluded in that script
oepps that could be it it was an OP who tested it with me .
gonna test it with other user .
Hi,
The OPs are not included so when they enter with a user they will not be detected, but they can only enter with one user, if they try to enter with another they will be block.
Best regards, nErBoS