Module: GeoIP+ (v1.3)
|
Re: Module: GeoIP Extented
Just to say that I was not planned to do it. Just by playing I feel like after to do something better with the latest GeoIP source code and I wanted to modify the original module too since I would prefer to have one module than several doing the same thing. xPaw is aware and his thread should be trashed. :p
I did not test thoroughly so I hope that people will test it. The linux version is untested at all. Since I'm fairly new making module, I hope the code is right. Thanks ! |
Re: Module: GeoIP Extended
Nice, I plan on trying this out....
Suggestion/Request: Add flag to return distance in either kilometers or miles. I don't know if this is right but highlighted is what i changed. (Notes after snippet) Code:
Code:
6371.0km is a bit more precise as it is the earth's mean radius not the equatorial radius of 6378.2km. (3959.0 is just the miles conversion of 6371.0) |
Re: Module: GeoIP Extended
Thanks !
I did not integrated the 'miles' option because I thought that you could do the conversion easily in your code. But it's true that's more neat to do that. Changes are done. I'm waiting others feedbacks to see if need another changes before updating here. |
Re: Module: GeoIP Extended
Oh noes there is my ip :mrgreen:
|
Re: Module: GeoIP Extended
but ISP ?
now we need a new plugin to show: 1.Country 2.City 3.STEAM 4.IP 5.ISP 6.Distance from server. with cvars:) |
Re: Module: GeoIP Extended
Is there a specific reason to want ISP ? Because I don't see that as interesting.
|
Re: Module: GeoIP Extended
ISP is other geoip base and there is no lite (free) version of it.
|
Re: Module: GeoIP Extended
if u cant make it is ok...but for me is v. interesting, and more interesting like :
- Time Zone - Continent Code Quote:
|
Re: Module: GeoIP Extended
PHP Code:
|
Re: Module: GeoIP Extended
I've kept the same design like geoip_code[2|3]_ex() where it returns true on a successful lookup, false on a failed lookup. It will not return "err" btw. But I understand what you mean, though you can avoid to create another var depending how you code.
|
Re: Module: GeoIP Extended
Why even make the continent a string?
I mean, you still have to use an array. |
Re: Module: GeoIP Extended
Sorry Superiority, I don't understand well what you mean.
|
Re: Module: GeoIP Extended
... IT'S ENGLISH!
omfg... Make this Code:
native bool:geoip_continent_code( const ip[], result[3] ); Code:
native bool:geoip_continent_code( const ip[], result ); Code:
native geoip_continent_code( const ip[] ); Make it return an integer instead of a string. |
Re: Module: GeoIP Extended
Quote:
Still I don't understand because the continent code is composed of 2 characters so the output would be a string not integer. If not, explain better. |
Re: Module: GeoIP Extended
Quote:
You still need an array of the continents to use the full name. No one would ever use a 2 char code. That's only for comparsion/logs, and the comparsion would be even easier with integers. Code:
#define Europe 1 |
Re: Module: GeoIP Extended
Ok, now I understand. I would need to replace in the GeoIP code the continent code by numbers. But I would prefer to keep the characters since it can be useful for some people. ( like geoip_code[2|3]_ex() ). Then what about to return an integer AND to pass the characters but as optional param, people could do a choice so.
|
Re: Module: GeoIP Extended
Quote:
|
Re: Module: GeoIP Extended
Since I suck in english, I have some difficulty with the .inc.
Here the new version for geoip_continent_code(). Is someone can correct it since I'm not sure if it's well written or needs changes. I just want something perfect in english. :mrgreen: Code:
|
Re: Module: GeoIP Extended
this is great... i just installed vc++ the other day and was gonna try and do this myself.. saved me the trouble :-)
only issue i have, is sometimes certain IPs seem to crash the server like i setup a simple test plugin with a cmd to input my own IP and just started grabbing IPs from players on my server and running them thru it, and every now and then id get one that made the server crash i wish i had wrote down the IP so that i could post it here for others to try |
Re: Module: GeoIP Extended
Updated.
Quote:
|
Re: Module: GeoIP Extended
Quote:
|
Re: Module: GeoIP Extended
Code:
I also suggest something like: Code:
Then when you write code for it, you can do: Code:
It would have more readability. |
Re: Module: GeoIP Extended (v1.0.1)
I agree. Thanks ! And updated.
|
Re: Module: GeoIP Extended (v1.0.1)
any specific reason why the linux binary is named differently now?
|
Re: Module: GeoIP Extended (v1.0.1)
Oops I forgot to rename. :mrgreen:
EDIT: Done. Thanks. |
Re: Module: GeoIP Extended (v1.0.1)
ok i found an IP that cuases crashing...
98.154.81.146 if you try to get the region of that IP, it crashes the server finding country is fine, city gives error.. so im thinking maybe if i check for the error on the city lookup and skip the region lookup if it gives 'error' result, i might be able to avoid the crashing.. gonna do some testing and find some more IPs that give this problem tho |
Re: Module: GeoIP Extended (v1.0.1)
Woh. It's weird. Oo I'm trying to debug...
|
Re: Module: GeoIP Extended (v1.0.1)
Ok, after some debug, it's the GeoIPCity.dat file fault. It seems that there are no data for region and city for this ip. But it's weird because latitude and longitude exist..
so in : Code:
if ( rec ) So as fix, adding "&& rec->region" should be fine. I'm going to test and I will update here ASAP. |
Re: Module: GeoIP Extended (v1.0.2)
Updated.
Quote:
|
Re: Module: GeoIP Extended (v1.0.2)
:-) thanks.. love this module
+kama sutra |
Re: Module: GeoIP Extended (v1.0.2)
maybe dumb question but , does this give longitude/altitude of ISP (internet service provider) or ..'??
|
Re: Module: GeoIP Extended (v1.0.2)
Quote:
|
Re: Module: GeoIP Extended (v1.0.2)
alka - you funny.
That is not an answer :) my question was does longitude/altitude of my home... my home address... not location of isp. because you might know , that ip is given to you by isp... |
Re: Module: GeoIP Extended (v1.0.2)
He said, its not possible.
|
Re: Module: GeoIP Extended (v1.0.2)
It's gets location by your IP address, you can see what it does by testing it here:
http://www.maxmind.com/app/locate_ip - click on "click here" for your info. |
Re: Module: GeoIP Extended (v1.0.2)
Can you stop with
http://up2.podbean.com/image-logos/44997_logo.gif? |
Re: Module: GeoIP Extended (v1.0.2)
I have thought up a way how to calculate a city, and now all will repeat?
Badly arrive: \ |
Re: Module: GeoIP Extended (v1.0.2)
You suck at english.
|
Re: Module: GeoIP Extended (v1.0.2)
ok
|
All times are GMT -4. The time now is 17:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.