Selected IP only
 

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

Selected IP only

Started by dodgeviper, 16 August, 2007, 15:39:41

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dodgeviper

Can anyone please make a script that enables me to restrict a hub for a selected set of ip's like 10.100.97.*   
i have a lan connected we have ip range from 10.100.89.* till 10.100.99.*..
i want to make a hub only for 10.100.97.* users....
also for selecting which ip to allow...the script must ask me the range...and it should accept '*' format..instead of allowing all the ips

i shall be grateful to u...
also even if the master is of different range of ip then he can bypass the ip check and enter the hub...it will be better if it comes in right click command feature for the master only...

Cêñoßy†ê

Something to start with ;)

--[[
	Allow 1 range by C??o?y?? 16/08/2007
]]--

Bypass = {	-- allow profile to enter from other range 1/yes  0/no
	[0] = 1,
	[1] = 0,
	[2] = 0,
	[3] = 0,
	[-1] = 0,
}

OpConnected = function(user)
	if Bypass[user.iProfile] == 0 then
		if not user.sIP:find("10%.100%.97%.") then
			user:SendData(frmHub:GetHubBotName(),"Sorry but this is private hub !")
			user:Disconnect()
		end
	end
end

NewUserConnected = OpConnected
Powered By Leviathan™ 2nd Generation v. 1.9

dodgeviper

thanks a lot man....u r god...

burningstar

What do i have to change, if i want more than one ip range in my hub. For example 10.10.1.* 10.10.2.* and 10.10.3.*  but no other ips?

burningstar

Thank you for the quick response.
But...
If i try to run this script on my hub it says: [02:04] Syntax ....1_2487_R2R\DiXBoT_v1.1_2487_R2R\scripts\IPRange.lua:13: attempt to index global 'SetMan' (a nil value)

burningstar

Thanks a lot, now its working.
I?m not sure which version i got.. i?m using the latest dixbot r2r version with ptokax and i?m still trying to understand what all this LUA and API stuff means.

SMF spam blocked by CleanTalk