Hi.
I need a script that does something like this:
- it has a command to be used by users to allow only connections to the same country code.
- it has to be individual, for that a memory registry is made if the user has the block set on/off.
- it displays to ops-chat whenever a user sets the command.
the routine for getting the code can be obtained from GeoIP-script by VidFamne.
function tSearchCountry(num)
local num = tonumber(num)
local tGeoIpRangefile = tSearch(num)
dofile(tGeoIpRangefile)
if tGeoIpRange == nil then
return 1 end
local C = ""
local CC = ""
local low=1
local mid = tonumber(mid)
local high=getn(tGeoIpRange)
while low <= high do
mid = floor((low+high)/2)
if tGeoIpRange[mid][1] <= num and num <= tGeoIpRange[mid][2] then
C = tGeoIpRange[mid][4]
CC = tGeoIpRange[mid][3]
break
end
if tGeoIpRange[mid][1] > num then
high = mid-1
else low = mid+1
end
end
tGeoIpRange = nil
collectgarbage()
return C,CC
end
please help me... i don't know how to make a table of the users to check it they command status is on/off...
thx