Greatings scripters
I just wanted a script, that would be able to show the IP
of a username.
EX:
With the cmd !ip , the bot reveals the ip of tha user..
Thanks
Hi, Pit!
Try this:
--## IP_bot
--## Requested by Pit
--## Made by NemeziS
Bot = "IP_bot"
function DataArrival(user, data)
if (strsub(data, 1, 1) == "<") then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!ip") then
ShowIP(user, data)
return 1
end
end
end
function GetArgML(data)
s,e,cmd,arg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s*")
return arg
end
function ShowIP(curUser, data)
who = GetArgML(data)
if who == nil then
curUser:SendData(Bot, "Syntax Error, !ip , you must write name of the user!")
return 1
else
local user = GetItemByName(who)
if user == nil then
curUser:SendData(Bot, "This is not a user or maybe it's a bot! You must write a real username!")
return 1
end
ip = user.sIP
curUser:SendData(Bot, "User: "..who.." IP: "..ip.."")
end
end
;)
Best regards,
NemeziS
Hi nemeziS
Thanks for the quick reply..
I'll check it right away..
Keep helping who needs it..
Pit