PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: (=CyberPimp=) on 09 August, 2004, 09:38:39

Title: DCDM (hub supports user ip)
Post by: (=CyberPimp=) on 09 August, 2004, 09:38:39
I need a script so that my hub supports user ip, I?m trying to get ISP check to work on DCDM. It suposed to exist but I can?t find it.
http://www.imperialnet.org/forum/viewtopic.php?t=1109
Title:
Post by: plop on 09 August, 2004, 14:15:06
here you are.
-- enable bcdc++ on testdrive 4 made by tezlo

function Main()
frmHub:EnableFullData(1)
end

function DataArrival(user, data)
if strsub(data, 1, 7) == "$UserIP" then
local s, e, nick = strfind(data, "^%$UserIP (%S+)%|$" )
if nick == user.sName then
user:SendData( "$UserIP "..nick.." "..user.sIP)
elseif user.bOperator then
local tmp = GetItemByName(nick)
if tmp then user:SendData( "$UserIP "..nick.." "..tmp.sIP) end
end return 1
end
end

plop
Title:
Post by: (=CyberPimp=) on 09 August, 2004, 16:24:48
Tanx, but I still can?t get it to work, don?t know what im doing wrong  :baby:
Does it have to be this hard, the client gets the ip so I would think it sholdn?t be hard to get the name of the ISP from the list or is it something more to it.
Title:
Post by: plop on 09 August, 2004, 20:22:27
QuoteOriginally posted by (=CyberPimp=)
Tanx, but I still can?t get it to work, don?t know what im doing wrong  :baby:
Does it have to be this hard, the client gets the ip so I would think it sholdn?t be hard to get the name of the ISP from the list or is it something more to it.
this script adds the support for $UserIp 2 ptokax, for the rest you have 2 be on the DCDM site.

but check if you have the geoip file in the folder of DCDM, in some versions of BCDC this was missing so could be the same on DCDM.
but this is just for the country.

plop
Title:
Post by: (=CyberPimp=) on 09 August, 2004, 22:58:56
Tanx Plop.
I had more probs than that, if someone is haveing the same probs go to http://www.imperialnet.org/forum/viewtopic.php?p=6338#6338