Hi all..
didn't search well the forum.. i'm looking 4 a script that tell a user what ISP other user is.. (ip and hostname), something like:
--> [PT]user1: !isp
user2
--> [ISP-BOT]:
user2 is from (Brazil) with IP/ISP: 200.*.net.br
"Brazil" could be (i think) that function (country/hostname) that is on new UserInfo script by Patthy..
Hope it's possible this script, i really need this, i have a lot users with traffic limits, and this could help to identify some country users, etc.
TkS all.
Hi,
if I were you, i would implement a complete whois-query in my hubscript, that can be used by OPs only.
Normaly there is no need for normal users to know the IP from another user
Yokozuna
QuoteOriginally posted by Yokozuna
Hi,
if I were you, i would implement a complete whois-query in my hubscript, that can be used by OPs only.
Normaly there is no need for normal users to know the IP from another user
Yokozuna
yes, it could be just:
--> [ISP-BOT]:
user2 is from (Brazil), so.. international traffic to you !
this "so.. international/national traffic to you" only if was possible also identify the user that request the info, heh.
something like that.. who knows (i don't) =)
sorry the english !! TkS.
Hi again,
made same quick tests with the tohostname function.
It works, BUT
most of my "hubbies" have .net and .com as hostname ending ---> not possible to tell country.
I will post a script for you tommorow (sorry, no time right now) if it is still wanted.
Yokozuna
Here it is:
BOTNAME = "Trafficinfo"
PREFIX = "+"
function Main()
frmHub:RegBot(BOTNAME)
end
function DataArrival(user,data)
if (strsub(data,1,strlen(BOTNAME)+5) == "$To: "..BOTNAME) then
if strfind(data,PREFIX.."trafficto") then
_,_,_,userto = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
userto = strsub(userto,1,strlen(userto) - 1)
user2 = GetItemByName(userto)
hostname1 = tohostname(user.sIP)
hostname2 = tohostname(user2.sIP)
end
if hostname1 then
temp1 = strsub(hostname1,(strlen(hostname1)-4))
_,_,_,country1 = strfind(temp1,"(%a+).(%a+)")
end
if hostname2 then
temp2 = strsub(hostname2,(strlen(hostname2)-4))
_,_,_,country2 = strfind(temp2,"(%a+).(%a+)")
end
user:SendPM(BOTNAME1,country1.." "..country2)
if (country1 and country2) then
if (country1 ~= "net" and country1 ~= "com") then
if (country1 == country2) then
user:SendPM(BOTNAME,"Traffic from you to "..user2.sName.." is national traffic !")
else
user:SendPM(BOTNAME,"Traffic from you to "..user2.sName.." is international traffic !")
end
else
user:SendPM(BOTNAME,"It could not be determined if traffic from you to "..user2.sName.." is national or international traffic !")
end
else
user:SendPM(BOTNAME,"It could not be determined if traffic from you to "..user2.sName.." is national or international traffic !")
end
end
end
For info on traffic, a user sends a pm to the bot.
Syntax: +trafficto anotheruser
Hope it is what you wanted (I have not integrated your countrydetermination, the user who asks knows his country and can see if the user is from same country if the message says national traffic).
Give it a try, play with it and if you have additional questions contact me :-)
Yokozuna
P.S.
If someone wants to optimize this script, feel free to do so.
or you can goto finsihed scripts and look at my userinfo bot, which also tell you the country using web extension, i will be adding my ideas soon, to my userinfo, so it will be more accurate ;)
well, thank u Yokozuna.. i think did not work so well as i really wanted.. tks anyway.
Phatty, have u finnished the userinfo bot ? is there a way to have a standalone script to check user with the that hostname funtion ?