RangeMaster by Phatty
 

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

RangeMaster by Phatty

Started by pHaTTy, 31 January, 2004, 18:01:49

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pHaTTy

ok been learning whilst making a script, so here is RangeMaster v1, i know i have not updated it yet so please w8, i am working on loading into table etc, maybe and cleaning up to make abit faster ;)

Bot = "RangeMaster"

function Main()
end

function NewUserConnected(user)
	Blocked(user)
end

function OpConnected(user,data)
	Blocked(user)
end


function Blocked(user)
	local s,e,range1,range2,range3,range4 = strfind(user.sIP,"(%d+).(%d+).(%d+).(%d+)")
	--SendToAll(Bot,range1.." found to "..range2.." then to "..range3.." and finally "..range4)
	local handle = openfile("RangeMaster/Range.dat","r")
	line = read(handle)
	while line do
		if (line == nil) then 
			break
		elseif strfind(line, "$"..range1.."$",1,1) then
			--SendToAll(Bot,line.." was found with nick: "..user.sName)
			local s,e,rangerS,therest = strfind(line,"(%S+)$(.*)")
			--SendToAll(Bot,rangerS.." then "..therest)
			local s,e,ipa1,ipb1,ipc1,ipd1,ipa2,ipb2,ipc2,ipd2 = strfind(line,"(%d+).(%d+).(%d+).(%d+)|(%d+).(%d+).(%d+).(%d+)")
			--SendToAll(Bot,ipa1..ipb1..ipc1..ipd1..ipa2..ipb2..ipc2..ipd2)

			if range1 < ipa1 then
				return 0
			elseif range1 > ipa2 then
				return 0
			elseif range1 > ipa1 and range1 < ipa2 then
				SendToAll(Bot,"Banning: "..user.sName.." for bad ip: "..user.sIP)
				user:Ban()
			else
				if range2 < ipb1 then
					return 0
				elseif range2 > ipb2 then
					return 0
				elseif range2 > ipb1 and range1 <= ipb2 then
					SendToAll(Bot,"Banning: "..user.sName.." for bad ip: "..user.sIP)
					user:Ban()
				else
					if range3 < ipc1 then
						return 0
					elseif range3 > ipc2 then
						return 0
					elseif range3 > ipc1 and range1 < ipc2 then
						SendToAll(Bot,"Banning: "..user.sName.." for bad ip: "..user.sIP)
						user:Ban()
					else
						if range4 < ipd1 then
							return 0
						elseif range4 > ipd2 then
							return 0
						elseif range4 > ipd1 and range4 < ipd2 then
							SendToAll(Bot,"Banning: "..user.sName.." for bad ip: "..user.sIP)
							user:Ban()
						else
							return 0
						end
					end
				end
			end
		end
	line = read(handle)
	end
end

i have added some ips to files

but i will add download link once i actually finish this project,

to add an ip



example a

$127$|127.0.0.0|127.0.0.2 --will ban 127.0.0.1

emaple b

$127$128$129$|127.0.0.1|129.0.0.1 --will ban whatever is in between ;)


^^^im going to be working on this now, so if anyone has tips give me some time first see if i can figure them out, im enjoying working on this ;)

so and ip is

$range$anotherrange$|ipfrom|toip

you can add as many ranges as you wish

just look at examples and ask if you want an answer ;)


NOTE: Make a folder and file in scripts dir named RangeMaster/Range.dat

pHaTz,,
Resistance is futile!

NightLitch

//NL

pHaTTy

QuoteOriginally posted by NightLitch
Nice Phatty.

yep thx, but i think ive made a big mistake, i must have been tired when i wrote this too, i will be releasing a fixed version asap...........
Resistance is futile!

pHaTTy

well fixed this, and also added many ips to range, all bad ips, so i will update the script more and then upload it to a server with a auto compile so you can compile it urserf and make faster ;)

--//RangeMaster v1 fixed by Phatty
--//Much more todo

Bot = "RangeMaster"

function Main()
end

function NewUserConnected(user)
	Blocked(user)
end

function OpConnected(user,data)
	Blocked(user)
end


function Blocked(user)
	local s,e,range1,range2,range3,range4 = strfind(user.sIP,"(%d+).(%d+).(%d+).(%d+)")
	--SendToAll(Bot,range1.." found to "..range2.." then to "..range3.." and finally "..range4)
	local handle = openfile("RangeMaster/Range.dat","r")
	line = read(handle)
	while line do
		if (line == nil) then 
			break
		elseif strfind(line, "$"..range1.."$",1,1) then
			--SendToAll(Bot,line.." was found with nick: "..user.sName)
			local s,e,rangerS,therest = strfind(line,"(%S+)$(.*)")
			--SendToAll(Bot,rangerS.." then "..therest)
			local s,e,ipa1,ipb1,ipc1,ipd1,ipa2,ipb2,ipc2,ipd2 = strfind(line,"(%d+).(%d+).(%d+).(%d+)|(%d+).(%d+).(%d+).(%d+)")
			--SendToAll(Bot,ipa1..ipb1..ipc1..ipd1..ipa2..ipb2..ipc2..ipd2)

			if range1 < ipa1 or range1 > ipa2 then
				return 0
			else
				if range2 < ipb1 or range2 > ipb2 then
					return 0
				else
					if range3 < ipc1 or range3 > ipc2 then
						return 0
					else
						if range4 < ipd1 or range4 > ipd2 then
							return 0
						else
							SendToAll(Bot,user.sName.." is being banned for bad ip:"..user.sIP)
							user:Ban()
						end
					end
				end
			end
		return 0
		end
	line = read(handle)
	end
end

enjoy for now until i do some more
Resistance is futile!

pHaTTy

ok wasnt sorted properly dont use the last 2 lol

here is the proper working on ;)

--//RangeMaster v1.01 fixed by Phatty
--//Much more todo
--//Ip Keys Written by (uk-kingdom)John
--//Lots of time testing by Chilla, thx mate ;)

Bot = "RangeMaster"

function Main()
end

function NewUserConnected(user)
	Blocked(user)
end

function OpConnected(user)
	Blocked(user)
end


function Blocked(user)
	local s,e,range1,range2,range3,range4 = strfind(user.sIP,"(%d+).(%d+).(%d+).(%d+)")
	--SendToAll(Bot,range1.." found to "..range2.." then to "..range3.." and finally "..range4)
	local handle = openfile("RangeMaster/Range.dat","r")
	line = read(handle)
	while line do
		--if (line == nil) then 
		--	break
		if strfind(line, "%$"..range1.."%$")  then
			--SendToAll(Bot,line.." was found with nick: "..user.sName)
			local s,e,rangerS,therest = strfind(line,"(%S+)$(.*)")
			--SendToAll(Bot,rangerS.." then "..therest)
			local s,e,ipa1,ipb1,ipc1,ipd1,ipa2,ipb2,ipc2,ipd2 = strfind(line,"(%d+).(%d+).(%d+).(%d+)|(%d+).(%d+).(%d+).(%d+)")
			--SendToAll(Bot,ipa1..ipb1..ipc1..ipd1..ipa2..ipb2..ipc2..ipd2)

			if range1 < ipa1 or range1 > ipa2 then
			else
				if range2 < ipb1 or range2 > ipb2 then
				else
					if range3 < ipc1 or range3 > ipc2 then
					else
						if range4 < ipd1 or range4 > ipd2 then
						else
							SendToAll(Bot,user.sName.." is being banned for bad ip:"..user.sIP)
							user:Ban()
							return 0
						end
					end
				end
			end
		end
	line = read(handle)
	end
end

will be back with more
Resistance is futile!


Guibs

Hi there,,

Sounds like a very nice & cool script there,... :)

Well done, Phatty,, & keep it up,, ;)

l8tr,,
-- Please,... don\'t ask help in Pm,...Forums are made for that, to help everyone & my Inbox pm will be safe,... Thks,,  :))  --
CB forum     /     CB Home page

pHaTTy

QuoteOriginally posted by Guibs
Hi there,,

Sounds like a very nice & cool script there,... :)

Well done, Phatty,, & keep it up,, ;)

l8tr,,

thx mate :))
Resistance is futile!

nEgativE

Keep updating .. Good work, TkS

pHaTTy

ok rewritten most, its now loaded into memory for effiecency ;)

DOWNLOAD

--//RangeBlaster v2.00 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function NewUserConnected(user) 
	if Blocked(user) == 1 then 
		user:SendPM(Bot, "This hub is private, you will now be disconnected!") 
		user:SendPM(Bot, "Disconnecting...") 
		SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
		user:Ban() 
	end 
end

OpConnected = NewUserConnected

function LoadIps()
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		local s,e,range,ipr1,ipr2 = strfind(line,"$(%S+)$|(%S+)|(%S+)") --range may be used later on in development
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
end

function Blocked(user) 
	local s,e,range1,range2,range3,range4 = strfind(user.sIP,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)") 
		if range1 < ipa1 or range1 > ipa2 then
		else
			if range2 < ipb1 or range2 > ipb2 then
			else
				if range3 < ipc1 or range3 > ipc2 then
				else
					if range4 < ipd1 or range4 > ipd2 then
					else
						return 1
					end
				end
			end
		end
	end
end

127.0.0.1 to 128.0.0.0 is not supported because 0 end is below the 127 end 0, i will add this in later ;)

so each end must be higher per value.....
Resistance is futile!

NotRabidWombat

#10
Convert the text IP into an actual IP. So you read in A.B.C.D but then you create:
iIP = D + C * 256 + B * 65536 + C * 16777216;

This will give you number between 4294967295 and 0 which you can do very simple conditions on.

Did something like this a while back. The next step is to sort your range table so it can intelligently skip several ranges the number can not be in (so sort of binary search would work). After I made the script we all decided it would MUCH faster to use a nice firewall to block IPs faster than any script ever could.

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

pHaTTy

little update for speed, this bot im setting on 1 range per ban

so 127 - 128 willnot be supported but ive never seena  range like that anyways ;)

--//RangeBlaster v2.01 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function NewUserConnected(user) 
	if Blocked(user.sIP) == 1 then 
		user:SendPM(Bot, "This hub is private, you will now be disconnected!") 
		user:SendPM(Bot, "Disconnecting...") 
		SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
		user:Ban() 
	end 
end

OpConnected = NewUserConnected

function LoadIps()
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		local s,e,range,ipr1,ipr2 = strfind(line,"$(%S+)$|(%S+)|(%S+)") --range may be used later on in development
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
end

function Blocked(userip) 
	local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)")
		if range1 == ipa1 then
			if range1 < ipa1 or range1 > ipa2 then
			else
				if range2 < ipb1 or range2 > ipb2 then
				else
					if range3 < ipc1 or range3 > ipc2 then
					else
						if range4 < ipd1 or range4 > ipd2 then
						else
							return 1
						end
					end
				end
			end
		end	
	end	
end
Resistance is futile!

pHaTTy

even faster now done in datarival meaning less bandwidth no checks for user ;)

--//RangeBlaster v2.02 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)
--//Much faster now done in dataarival so less bandiwdth used for bad user ;)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function LoadIps()
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		local s,e,range,ipr1,ipr2 = strfind(line,"$(%S+)$|(%S+)|(%S+)") --range may be used later on in development
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
end

function Blocked(userip) 
	local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)")
		if range1 == ipa1 then
			if range1 < ipa1 or range1 > ipa2 then
			else
				if range2 < ipb1 or range2 > ipb2 then
				else
					if range3 < ipc1 or range3 > ipc2 then
					else
						if range4 < ipd1 or range4 > ipd2 then
						else
							return 1
						end
					end
				end
			end
		end	
	end	
end

function DataArrival(user,data)
	if strsub(data, 1, 8) == "$Version" then
		if Blocked(user.sIP) == 1 then 
			user:SendData(Bot, "This hub is private, you will now be disconnected!") 
			user:SendData(Bot, "Disconnecting...") 
			SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
			user:Ban() 
		end
	end
end

bbl
Resistance is futile!

pHaTTy

optionally you can make it little faster by validatenick but it means u dont actually reiceve the nick so its unknown, i prefere version so u see nick but upto you


--//RangeBlaster v2.02 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)
--//Much faster now done in dataarival so less bandiwdth used for bad user ;)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function LoadIps()
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		local s,e,range,ipr1,ipr2 = strfind(line,"$(%S+)$|(%S+)|(%S+)") --range may be used later on in development
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
end

function Blocked(userip) 
	local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)")
		if range1 == ipa1 then
			if range1 < ipa1 or range1 > ipa2 then
			else
				if range2 < ipb1 or range2 > ipb2 then
				else
					if range3 < ipc1 or range3 > ipc2 then
					else
						if range4 < ipd1 or range4 > ipd2 then
						else
							return 1
						end
					end
				end
			end
		end	
	end	
end

function DataArrival(user,data)
	if strsub(data, 1, 13) == "$ValidateNick" then
		if Blocked(user.sIP) == 1 then 
			user:SendData(Bot, "This hub is private, you will now be disconnected!") 
			user:SendData(Bot, "Disconnecting...") 
			SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
			user:Ban() 
		end
	end
end
Resistance is futile!

NightLitch

Well your script is getting better & better AND intresting.

Keep up the work, and I hope I can "borrow" a line or two if I
intend rewriting my ip-script someday.

Have a nice day. / NL
//NL

pHaTTy

QuoteOriginally posted by NightLitch
Well your script is getting better & better AND intresting.

Keep up the work, and I hope I can "borrow" a line or two if I
intend rewriting my ip-script someday.

Have a nice day. / NL

thanks bro,

here 2.03 ;)

--//RangeBlaster v2.03 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)
--//Thanks to RabidWombat for an idea :)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function LoadIps()
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		local s,e,range,ipr1,ipr2 = strfind(line,"$(%S+)$|(%S+)|(%S+)") --range may be used later on in development
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
end

function Blocked(userip) 
	local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)")
		ranger1 = ipa1..ipb1..ipc1..ipd1
		ranger2 = ipa2..ipb2..ipc2..ipd2
		ranged1 = range1..range2..range3..range4
		if range1 == ipa1 then
			if ranged1 < ranger1 or ranged1 > ranger2 then
			else
				return 1
			end
		end	
	end	
end

function DataArrival(user,data)
	if strsub(data, 1, 13) == "$ValidateNick" then
		if Blocked(user.sIP) == 1 then 
			user:SendData(Bot, "This hub is private, you will now be disconnected!") 
			user:SendData(Bot, "Disconnecting...") 
			SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
			user:Ban() 
		end
	end
end

nice idea got off rabids way thx ;)
Resistance is futile!

pHaTTy

only thing i woudnt use last method i wud still use one of the older because if an ip such as

217.23.23.23

and

217.3.333.23  just as example

then pfff
Resistance is futile!

NightLitch

QuoteOriginally posted by Phatty

only thing i woudnt use last method i wud still use one of the older because if an ip such as

217.23.23.23

and

217.3.333.23 just as example

then pfff

Well bro :-) 333 is not an valid number in ranges anyway, max 255 :-), mean not to be a pain in the ass now.. :-D

you could limit the numbers maybe all over 255 is not a valid number and under 0 or 023 example is not valid. Just some ideas.

/NL
//NL

NightLitch

Quoting myself:  under 0

hehe

there can't be under 0 I mean 034 hehe...

Must be really dizzy... :-p
//NL

pHaTTy

loooool

81.-0.1-234 :P ghehehe ;)
Resistance is futile!

NightLitch

hahaha lool

I think that will indeed WORK really good.

I mean -0.1-234 that is so my range. :-D
//NL

pHaTTy

nah didnt like other way inaccurate so

--//RangeBlaster v2.05 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function LoadIps()
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		local s,e,ipr1,ipr2 = strfind(line,"(%S+)|(%S+)")
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
end

function Blocked(userip) 
	local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)")
		if range1 == ipa1 then
			if range1 < ipa1 or range1 > ipa2 then
			else
				if range2 < ipb1 or range2 > ipb2 then
				else
					if range3 < ipc1 or range3 > ipc2 then
					else
						if range4 < ipd1 or range4 > ipd2 then
						else
							collectgarbage()
							flush()
							return 1
						end
					end
				end
			end
		end	
	end	
end

function DataArrival(user,data)
	if strsub(data, 1, 13) == "$ValidateNick" then
		if Blocked(user.sIP) == 1 then 
			user:SendData(Bot, "This hub is private, you will now be disconnected!") 
			user:SendData(Bot, "Disconnecting...") 
			SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
			user:Disconnect() 
		end
	end
end
Resistance is futile!

pHaTTy

i will upload a package with 1224 ip ranges very soon, i have more to add

so far with those ranges bot using 146/293

--//RangeBlaster v2.05 by Phatty
--//Ip Keys Written by (uk-kingdom)John
--//Memory based, will be tweaking soon, to make faster ;)

Bot = "RangeBlaster" 

Ranges = {} 

function Main() 
	frmHub:RegBot(Bot)
	LoadIps()
end 

function LoadIps()
	local tmp = 0
	local handle = openfile("RangeBlaster/Ranges.dat","r")
	line = read(handle)
	while line do
		tmp = tmp + 1
		local s,e,ipr1,ipr2 = strfind(line,"(%S+)|(%S+)")
		if ipr2 == nil then
			SendToAll(Bot,"Error on line "..line)
		end
		Ranges[ipr1] = ipr2
	line = read(handle)
	end
	SendToAll(Bot,"Successfully loaded "..tmp)
end

function Blocked(userip) 
	local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)")
	for i,p in Ranges do 
		local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") 
		local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)")
		if range1 == ipa1 then
			if range1 < ipa1 or range1 > ipa2 then
			else
				if range2 < ipb1 or range2 > ipb2 then
				else
					if range3 < ipc1 or range3 > ipc2 then
					else
						if range4 < ipd1 or range4 > ipd2 then
						else
							collectgarbage()
							flush()
							return 1
						end
					end
				end
			end
		end	
	end	
end

function DataArrival(user,data)
	if strsub(data, 1, 13) == "$ValidateNick" then
		if Blocked(user.sIP) == 1 then 
			user:SendData(Bot, "This hub is private, you will now be disconnected!") 
			user:SendData(Bot, "Disconnecting...") 
			SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") 
			user:Disconnect() 
		end
	end
end

pHaTz,,
Resistance is futile!

NotRabidWombat

The problem with:
ranger1 = ipa1..ipb1..ipc1..ipd1

Is you are still using strings. And a string of an IP address is much different than the number it is supposed to be as you found with:
217.23.23.23
and
217.3.333.23

Try making the IPs in integers like so.
iIP = D + C * 256 + B * 65536 + C * 16777216;

You may have to call tonumber(...) on a some of the strings.

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

pHaTTy

hmm im not so god with all that sort of things, but hey, i have time to learn thx, ill look into it :))
Resistance is futile!

SMF spam blocked by CleanTalk