hello guyz , i can't find any online IP checker script, is there any ? , if yes could somebody point me in the right direction
I would like something like !whoip IP and output if it is any user with that IP
thx
Userbekcisi should be your friend when it comes to this 8)
Although it may need an update
Try this ;)
ChatArrival = function(user,data)
local _,_,cmd,what = data:find("%b<>%s+(%S+)%s(.*)|")
if cmd == "!whoip" then
if what and what:find("%d+%.%d+%.%d+%.%d+") then
if Search(what) == nil then
user:SendData(frmHub:GetHubBotName(),"No user logged with that IP")
else
user:SendData(frmHub:GetHubBotName(),Search(what))
end
else
user:SendData(frmHub:GetHubBotName(),"Invalid IP string (example string 127.0.0.1)")
end
return 1
end
end
Search = function(what)
for _,who in pairs(frmHub:GetOnlineUsers()) do
if who.sIP == what then
return("Found user: "..who.sName.." with ip "..what)
end
end
end
10q C??o?y?? for the script ,it's working good :)
if what and what:find("%d+%.%d+%.%d+%.%d+") then
Is this new? Shouldn't it be:
if what and string.find(what,("%d+%.%d+%.%d+%.%d+")) then
Didn't script for a while, but thisone got my attention :-)
Since LUA 5.11 they can be used, easier and faster. string.sub(smth,1,4) == smth:sub(1,4), string.gsub(smth,"%W","") == smth:gsub("%W",""), and so on. less parameter, faster code :)
That's great! Thanx for your explenation. ;D