hey ppl :)
i need Please Script That block users with 1 ip and diffrent names
like
psy
psy1
psy2
from same ip..
need help withthat please.. ::)
Hi Mutor.. Night.. ;)
To entry to hub.
You Can help please ?
i used untill now with That Script
--------------------------------
--Requested by [NL]trucker
--Made by nErBoS
Bot = ".???iN-System???."
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
--------------------------------------------
but something wuth that script do me a problem..
& my users get blocked all the time.. even if the not mor then 1 time in the hub them get the msg
"You are already connected to the HUB with another nick"
if u can can help please
--// Anti-Double-Login made by 6Marilyn6Manson6 23/03/2006
--// Include table for Immune nick
BotName = frmHub:GetHubBotName()
MessageADL = "Double-Login is not allowed in this HuB ;)"
tImmune = {
["6Marilyn6Manson6"] = 1,
["[ITA]6Marilyn6Manson6"] = 1,
}
function MyINFOArrival(curUser)
if not tImmune[curUser.sName] then
if not curUser.bOperator and not curUser.bConnected then
for _,LoggedUser in frmHub:GetOnlineNonOperators() do
if curUser.sIP == LoggedUser.sIP then
curUser:SendData(BotName,MessageADL)
curUser:Disconnect()
end
end
end
end
end
--// 6Marilyn6Manson6
This is my light version :P
Now if there are 10 users behind a NAT, only 1 of them is able to connect. Very good.
Yes.. this is small problem.. 90% of fastweb are blocked but.. you can added table for immune range-ip :P
--// Anti-Double-Login made by 6Marilyn6Manson6 23/03/2006
--// Include table for Immune nick
--// Include table for Immune IP
BotName = frmHub:GetHubBotName()
MessageADL = "Double-Login is not allowed in this HuB ;)"
tImmune = {
["6Marilyn6Manson6"] = 1,
["[ITA]6Marilyn6Manson6"] = 1,
}
tIPImmune = {
["192.168.*"] = 1,
["213.*"] = 1,
}
function MyINFOArrival(curUser)
if not tIPImmune[curUser.sIP] then
if not tImmune[curUser.sName] then
if not curUser.bOperator and not curUser.bConnected then
for _,LoggedUser in frmHub:GetOnlineNonOperators() do
if curUser.sIP == LoggedUser.sIP then
curUser:SendData(BotName,MessageADL)
curUser:Disconnect()
end
end
end
end
end
end
--// 6Marilyn6Manson6
This is ok
192.168.x.x can never be the value of user.sIP, same goes for 10.x.x.x and 172.16.x.x and 169.254.x.x
Yes i know, but in script tIPImmune is only an example :)
A hint: the config for the immune list should be an arraa, like: tImmune = {"joe","fak0r"}
and on startup you can make a hash table of it, so the config will be more user friendly.
:o
Thanks You!!!! Mutor 6Marilyn6Manson6 bastya_elvtars :-*
i go test it now!! tnx! :D