block users with 1 ip and diffrent names
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

block users with 1 ip and diffrent names

Started by electronic_Psycho, 22 March, 2006, 23:51:29

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

electronic_Psycho

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.. ::)

electronic_Psycho

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

6Marilyn6Manson6

--// 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

bastya_elvtars

Now if there are 10 users behind a NAT, only 1 of them is able to connect. Very good.
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

Yes.. this is small problem.. 90% of fastweb are blocked but.. you can added table for immune range-ip :P

6Marilyn6Manson6

--// 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

bastya_elvtars

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
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

#7
Yes i know, but in script tIPImmune is only an example :)

bastya_elvtars

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.
Everything could have been anything else and it would have just as much meaning.

electronic_Psycho

 :o
Thanks You!!!! Mutor 6Marilyn6Manson6 bastya_elvtars   :-*

i go test it now!! tnx! :D

SMF spam blocked by CleanTalk