Jump to content

Umm... adding a flag of a country?


Recommended Posts


Just wondering: some countries have their flags shown next to IPs of people and some don't.

1. Can you please tell me are all the flags present in uTorrent?

2. If not what could be done to add a new country fllag?

Thank you.

Link to comment
Share on other sites

Oh thanks! Uhh.. the more i learn the more complicated and less apparent everything becomes. :)

The link above has the following interesting line:

Country IP Range: to

Why can't utorrent utilize this? I mean instead of doing that umm... reverse thingy... just take the list of IP ranges for different countries and apply respective flags to them?

Link to comment
Share on other sites

I think having an option to use a geoip database would be lots better for this....

since ip resolve is not the way to find the country but the hostname which is worthless in many cases

having a geoip db..would be local...no need to resolve any ips..save bandwidth and connections

Hell...if u take a bigger look at this *picture* µtorrent being the most used torrent app

and 1 single person always doing dns resolve for each ip for the hundreds of connections the app connects to with 1 single torrent...

Just utorrent moving away from lookups to geoip would save the *global internet* millions of dns lookups per hour ;]

That's how much 1 single famous program can impact on global internet...

So yeah...µtorrent moving towards geoip would be lots better for everyone..not just torrent users ;]

Link to comment
Share on other sites

true but then you'd get no flag...why not have the feature without using the global resources of all which is the internet?

Support for it shouldn't be too hard to add since it already supports hosts and all...

this would just be an addition to support subnets in it ;]

Link to comment
Share on other sites

Then it's time for a change...turn it off as default...and add it like ipfilter...

People can use it but they have to provide the db..I'm sure users would provide up to date db's

for download for whoever would like to use this feature ;]

and also that way it wouldn't need to come with the app increasing its compact size to a monstrous size

Link to comment
Share on other sites

I'm not saying to add a database..but support for subnets in flags.conf

It already supports mapping hosts to countries and this feature would be the smallest thing to add

Looking at flags.conf I assume you guys already have a loop in the app to loop through the whole

file using at least 2 *if's*..

1 to ignore if the line starts by # (comments)

2 to check if the line has the divider | in it to map straight from host to country or else...

if the words on that line have 2 characters add them as country codes..thats all the file contains ;]

all in all..this feature would cost 1 function+1 elseif/if

(elseif to check to a 4th type of line instead of those 3 already in there so another char instead of | could be used to divide things for ip)

and 1 if to check if the ip is in the subnet on that line ;]

this would add what? 1 maybe 2kb on the total size? ;]

I'm not a C programmer but I do tcl on freetime...the logic is pretty much the same..

Take a look here http://wiki.tcl.tk/8909 on the end of that page the 2 functions ip2net/onNet

That's why I say it's a small feature ;]

PS: sorry for being a pain in the rear....but I think this is a great feature and easy to implement and would only make the world greener :D

Link to comment
Share on other sites

I agree with 'status', a option to turn it on or off will be great (adding it like ipfilter db, a file that you can update yourself). So if you prefer to use your processor to get the right flag, do it, if you prefer use a incomplete regular expression that fail a lot of times, you can do it too.

Link to comment
Share on other sites

Switeck defaulting to off wouldn't solve much being that when a user turns it on..they'll still come here and complain about whatever flag not showing...and ip subnets support would be an easy way to fix this...

There's tons of db's for Geoip throughout..and seriously? It's the standard thing these days.

Even web hit counters such as bbclone use it...

Ultimately...it would fall on the user wether or not he'd download a db and use it...otherwise it'd work pretty much like now...kinda like the ipfilter...there's the option...and people use it if they want

Link to comment
Share on other sites

  • 2 years later...
  • 10 months later...
I still can't understand why do some IP's come out as digits and others have that url-like look. This pictures has two digital IPs one from Belarus, the other one is from Moscow. Why don't they show up as others with a flag?


yess this is a not a looks good half of flags are missing in peer tab.even you place the files flags.conf and flags.bmp or set peer resolve country true.you never get the all flags in peer tab so i turn off the resolve ips in peer tab if you still want the all flags go for qbittorrent.yesterday i saw the ip adresses in peer its hostname whatbox.ca it was showing the canada flag but when i copy the ip paste in ip addresses website then the country ip was netherlands .even i add the adresses in flags.conf still it was showing canada flag instead of netherlands flag.yesterday i saw the another ip adresses showing which was the .arpa instead of .com hostname i also try to add the addresses in flags.conf it also dont show flag.it was a ip of india.did not work.simply admins never implement the feature if they dont like they never implement the feature .total 246 flags countries. only 15-16 internal flags present in utorrent i think.

ya it will be good idea if flags.conf will work on ip adresses not hostname user have to enter the ip adresees

then it will show the flags of unresolves ip also

for example

user have to add the full ip addreses|IN

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...