PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: little puppy on 24 February, 2004, 17:27:24

Title: no
Post by: little puppy on 24 February, 2004, 17:27:24
this is not what i am looking for I need "ISP" or these addresses
198-158-145-147.xdsl.us
think they are called isp
see

BotName = "CountryOnly"

country = "us"

function NewUserConnected(curUser)

local h = tohostname(curUser.sIP)
local s, e, c = strfind( h, ".*%.(%S+)")

SendToAll(BotName, h)

if (country == c) then
else
curUser:SendPM(BotName, "Only users from usa may access this hub!")
curUser:Disconnect()
end
end

the script above allows only connections from "us"
but now I really need that blocks all connections from "us".
but not one connection.

example: i dont know how to make scripts but take a look.

BotName = "CountryBlocker"

country = "us"

function NewUserConnected(curUser)

local h = tohostname(curUser.sIP) = block connections from this country.
but not 198-158-145-147.xdsl.us
or little puppy.no-ip.com
local s, e, c = strfind( h, ".*%.(%S+)")

SendToAll(BotName, h)

if (country == c) then
else
curUser:SendPM(BotName, "users from usa are not allowed Get lost!")
curUser:Disconnect()
end
end

something like this