this script check ip from user connected activ to hub
if dont match return a msg and the ip of user
and optional disconect user
--Correct-IP-V.1 for Active users
BotName = frmHub:GetHubBotName().."_IpCheck"
function SearchArrival(curUser, data)
if data ~= nil then
local s,e,userIP,r = string.find(data, "$Search%s+([^$]*):(.*)")
if string.lower(userIP) ~= "hub" then
if userIP ~= curUser.sIP then
curUser:SendData(BotName,"msg "..curUser.sIP)
-- curUser:Disconnect()
end
end
end
end
Syntax ...\0.3.3.0.b17.07.nt.dbg\scripts\tt.lua:8: attempt to call global `strlower' (a nil value)
change: if strlower(userIP) ~= "hub" then
into: if string.lower(userIP) ~= "hub" then
Command to do?
There is no command by this script. It only checks a user who logs in...
The final script is:
--Correct-IP-V.1 for Active users
BotName = frmHub:GetHubBotName().."_IpCheck"
function SearchArrival(curUser, data)
if data ~= nil then
local s,e,userIP,r = string.find(data, "$Search%s+([^$]*):([^$]+)")
if string.lower(userIP) ~= "hub" then
if userIP ~= curUser.sIP then
curUser:SendData(BotName,"msg "..curUser.sIP)
-- curUser:Disconnect()
end
end
end
end
I'm searching a script who find me an ip,who had it,as about yhub.
Ipinfo,Iprangeinfo,even if user is not on-line.
QuoteOriginally posted by CaSaNoVa
I'm searching a script who find me an ip,who had it,as about yhub.
Ipinfo,Iprangeinfo,even if user is not on-line.
Ip info can be done with a script NL just released...
Standalone Userinfo Database
Search for it on the board. IP-range info was available in LUA4, but connecting to servers by script is not available in LUA5. Go to //www.dnsstuff.com for the info you need for the ranges.
10x ttb for correction of my script
i see have errors but i forget to correct'it
ttb , i dont know why when a strongdc++ client , zdc++ .
when make a search, the line code
code:
local s,e,userIP,r = string.find(data, "$Search%s+([^$]*):([^$]+)")
should be return the ip of user ,
but i dont know why , from strongdc client dont work
and de userIP it something like this 10.48.11.245:2000 F?T?0?9?TTH
I dont understand why dont separate the userIP from rest of the data based on letter " : "
any suggestions
Hi, hm.. I don't know. I have tested the script quickly, but I got also another prob with it. I only converted the script, but when I have time, I will try to fix it. If someone else also can do, that would be nice
a little solve , but not solve the problem when dont saparate the ip user from search data , just dont send the msg when when this hapen
new code :
--Correct-IP-V.1 for Active users
--if some one know or have a better ideea post here : [URL]http://board.univ-angers.fr/thread.php?threadid=4496&boardid=26&styleid=1&sid=fc58de8e2f68a10615b153e66fe3f220[/URL]
BotName = frmHub:GetHubBotName().."_IpCheck"
function SearchArrival(curUser, data)
if data ~= nil then
local s,e,userIP,r = string.find(data, "$Search%s+([^$]*):(.*))")
if string.lower(userIP) ~= "hub" then
if r ~= nil then
if userIP ~= curUser.sIP then
curUser:SendData(BotName,userIP.."\r\nmsg : "..curUser.sIP)
-- curUser:Disconnect()
end
end
end
end
end
i make some modification but the error whit strong dc ++ client not solve
--Correct-IP-V.1 for Active users
--if some one know or have a better ideea post here : [URL]http://board.univ-angers.fr/thread.php?t...5b153e66fe3f220[/URL]
BotName = frmHub:GetHubBotName().."_IpCheck"
function SearchArrival(Usersearch, datasearch)
if datasearch ~= nil then
local datalow = string.lower(datasearch)
--string.find(data, "$Search%s+([^$]*):(.*))")
local s,e,userIP,r = string.find(datalow, "$search%s+(%S+):(%S*)")
if userIP ~= "hub" and userIP ~= nil then
if string.len(userIP) < 16 then
if r ~= nil and r ~= 0 then
if userIP ~= Usersearch.sIP then
Usersearch:SendData(BotNameIp,userIP.."\r\nEste foarte probabil ca ipul de la setarile tale de activ sa nu fie corect.\r\n daca nu stii la ce ma refer verifica in \r\n FILE --> SETTING --> ACTIV \r\n Verifica daca ipul scris acolo corespunde cu cel care til returneaza hubul : \r\n de catre hub esti vazut cu ipul : "..Usersearch.sIP)
-- curUser:Disconnect()
end
end
end
end
end
end