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...
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
thanks a lot man....u r god...
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?
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)
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.