PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: c h i l l a on 21 December, 2003, 19:41:36

Title: correct active ip
Post by: c h i l l a on 21 December, 2003, 19:41:36
I found this old script, maybe you find it usefull since I haven't found something like this on this board.

--Correct-IP-V.1 for Active users
--Idea by [aDe] , by c h i l l e r

function Main()
frmHub:EnableSearchData(1)
end

function DataArrival(curUser, data)
if (strsub(data, 1, 7) == "$Search") then
local _,_,ip = strfind( data, "$Search%s+(%S+):" )
if ip and (ip~="Hub") and (ip~=curUser.sIP) then
curUser:SendData("Please update your Active IP address to: "..curUser.sIP)
curUser:Disconnect()
return 1
end
end
end
Title:
Post by: IceCoder on 21 December, 2003, 20:11:13
nice thing  :]
Title:
Post by: BlazeXxX on 24 December, 2003, 21:10:09
So this checks whether they faking IPs? Wudn't it be a problem if someone is having a router ip resolving?
Title:
Post by: plop on 24 December, 2003, 23:09:12
QuoteOriginally posted by BlazeXxX
So this checks whether they faking IPs? Wudn't it be a problem if someone is having a router ip resolving?
it compairs the ip witch the client sends with the ip the hub sees.
can be a real problem for hub owners as they have 2 set the outside ip while the hub sees there local ip.
but if you bypase it for them it works nicely.

plop