Moze taki skrypt Ci to ulatwi:
-This is a LUA Script made By: NightLitch and modified by RDS-Romania TEAM
--ENJOY!
---------------------------------------------------------------------
-- IP - Ranger for Verlihub / By: NightLitch
-- Modif. By: RDS-Romania TEAM
-- email: warez.romania@gmail.com
-- rds-romania hub: hub.rds-zone.ro:411
-- visit http://www.craiova-online.ro
---------------------------------------------------------------------
-- bot name
sBotName = "[--IP-Guard--]"
sBotDescryption = "Don't try to fuck me.."
sBotMail = "admin@mafianet.pl"
-- Add bot
function Main()
VH:AddRobot(sBotName, 10, sBotDescryption, "Bot", sBotMail, "0")
end
-- Range Table
aRange = {
-- Gohan static
["89.xxx.159.130-89.xxx.159.130"]=0,
-- Masger Neo dynamic
["83.xxx.0.0-83.xxx.255.255"]=0,
--bati
["88.xxx.64.0-88.xxx.127.255"]=0,
-- End of Table
}
---------------------------------------------------------------------
-- Don't Edit --
---------------------------------------------------------------------
-- Functions
Func = {}
Func.ComIP = function(curIP)
local _,_,a,b,c,d = string.find(curIP, "(%d+).(%d+).(%d+).(%d+)")
return a*16777216 + b*65536 + c*256 + d
end
Func.CheckIP = function(curIP)
local _,_,a,b,c,d = string.find(curIP, "(%d*).(%d*).(%d*).(%d*)")
if ( tonumber(a) and tonumber(b) and tonumber(c) and tonumber(d) ) then
local UserIP = Func.ComIP(curIP)
if UserIP then
for Range, Table in pairs(aRange) do
local _,_,R1,R2 = string.find(Range, "(%S+)-(%S+)")
Range1 = Func.ComIP(R1)
Range2 = Func.ComIP(R2)
if UserIP >= Range1 and UserIP <= Range2 then
return 1,Range
end
end
end
end
return 0
end
---------------------------------------------------------------------
-- Verlihub UserConnected Starts Here --
---------------------------------------------------------------------
function VH_OnUserLogin(sNick)
local Allow,Range = Func.CheckIP(GetIP(sNick))
local res,class = VH:GetUserClass(sNick)
---------------------------------------------------------------------
-- jesli nie w access liscie i class 3 i w gore
---------------------------------------------------------------------
if (Allow == 0) and (res and class >= 3)
then
VH:SendDataToUser("$To: sNick From: $<"..sBotName.."> \nForbidden. Your IP: "..ip.." is not inside Access list, discconnect - sorry |", sNick)
VH:CloseConnection(sNick)
end
return 1
end
---------------------------------------------------------------------
-- Check IP
---------------------------------------------------------------------
function GetIP(sNick)
res, ip = VH:GetUserIP(sNick)
return ip
end
Ja go przerobilem, tak by dzialal od c3 w gore i w odpowiednim miejscu zrobilem polski komentarz gdzie wystarczy zmienic napewno dasz rade. Do autoryzacji stalych ip polecam lodokola. Co do verlihuba:
[::] ip_zone4_min = ip poczatkowe np 87.87.87.0
[::] ip_zone4_max = ip koncowe np 87.87.87.255
i to masz 1 zakres w czym problem?
a zeby Ci rozjasnic jak to wszystko dziala:
[16:24] <[--AK-47--]>
- [::] Version date: Monday Jul 20 2009
- [::] Uptime count: 1weeks 2days
- [::] Server frequency: 16.0556 (Normal mode)
- [::] Hub name : • M a f i a H u b • L a C o s a N o s t r a ™ •
- [::] Hub Owner : Gokan
- [::] Hub Category : MafiaNet.pl
- [::] Total user limit : 15000
- [::] Current online users: 3186
- [::] Current share total: 272.64 TB
- [::] User list count: 3181
- [::] Hello user count: 2
- [::] In Progress users: 3
- [::] Active user count: 1353
- [::] Op user count: 15
- [::] Bot user count: 4
- [::] Upload zone 0: 2.36 MB/s
- [::] Upload zone 1: 932.44 KB/s
- [::] Upload zone 2: 184.22 KB/s
- [::] Upload zone 3: 70.39 KB/s
- [::] Upload zone 4: 0.00 B/s
- [::] Upload zone 5: 0.00 B/s
- [::] Upload zone 6: 0.00 B/s
- [::] Current upload total for all zones: 3.52 MB/s
- [::] Zone (0) all users: 1617 / 12000
- [::] Zone (1) RO users: 1188 / 12000
- [::] Zone (2) PL users: 255 / 12000
- [::] Zone (3) :CZ:SK: users: 126 / 12000
- [::] Zone (4) IP-Range : 0 / 1000
- [::] Zone (5) IP-Range : 0 / 1000
- [::] Zone (6) IP-Range : 0 / 1000
OK
Userzy standardowo wpadaja w - [::] Upload zone 0: 2.36 MB/s
1,2,3 to cc zone i dzialaja jesli je ustawisz wtedy pokazuja ilosci userow z danym cc na hubie. Kolejne 4,5 i 6 to sa rangi ip i userzy beda wyswietlani w takim zonie (randze) w ktorej sie mieszcza, lapiesz teraz?
pozdro