Raised This Month: $51 Target: $400
 12% 

[ANY] City Bans


Post New Thread Reply   
 
Thread Tools Display Modes
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-18-2016 , 17:06   Re: [ANY] City Bans
Reply With Quote #11

Quote:
Originally Posted by sigerman View Post
I'm having trouble with some users, that geoip does not return any ubication to their ip

Something like, Kicked :Your city () is banned from this server
Try updating your geoip database from maxmind's website. Let me know if it worked.

Quote:
Originally Posted by ish12321 View Post
Few Suggestions by me :
Firstly, I think geoip+ if installed this can work in 1.8.2 also
So mention it please....

Secondly no database, or anything can get city for all iP's
So give a check for if the returned value for city is empty or not ...

You can always PM me if any help needed
There's no need for geoip+ if you run AMXX 1.8.3. I have no reason to support a very old version of AMXX that lacks so many features.
Why would I need a database? MaxMind's database already works as a 'static database'
__________________
retired

Last edited by shavit; 10-18-2016 at 17:07.
shavit is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-18-2016 , 17:15   Re: [ANY] City Bans
Reply With Quote #12

The plugin requires the GeoIP2Lite City database if you're using geoip_city() native. You should add a note where to download it (http://dev.maxmind.com/geoip/geoip2/geolite2/ and specifically http://geolite.maxmind.com/download/...2-City.mmdb.gz (25 Mo), to be put in /data/).
The one provided by default is the GeoIP2Lite Country (because it takes less place and is enough for most of uses, but doesn't contain city infos).

If you want to use this plugin with 1.8.2, you can probably use geoip+ module.
__________________

Last edited by Arkshine; 10-18-2016 at 17:23.
Arkshine is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-19-2016 , 00:29   Re: [ANY] City Bans
Reply With Quote #13

Quote:
Originally Posted by Arkshine View Post
The plugin requires the GeoIP2Lite City database if you're using geoip_city() native. You should add a note where to download it (http://dev.maxmind.com/geoip/geoip2/geolite2/ and specifically http://geolite.maxmind.com/download/...2-City.mmdb.gz (25 Mo), to be put in /data/).
The one provided by default is the GeoIP2Lite Country (because it takes less place and is enough for most of uses, but doesn't contain city infos).

If you want to use this plugin with 1.8.2, you can probably use geoip+ module.
Added to the thread, thanks.
__________________
retired
shavit is offline
ish12321
Veteran Member
Join Date: May 2016
Old 10-19-2016 , 05:09   Re: [ANY] City Bans
Reply With Quote #14

Quote:
Originally Posted by Arkshine View Post
If you want to use this plugin with 1.8.2, you can probably use geoip+ module.
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 10-21-2016 , 13:47   Re: [ANY] City Bans
Reply With Quote #15

I updated geoip city and country to the last version

Still having the same trouble with a few users (the majority of the people is just fine with the mod)

Kicked :Your city () is banned from this server (empty city)

And the ip checked with geoip has no city registered
I give you an ip if you must check: 181.14.243.166

Sorry for doing this so late, I didn't have a lot of time

Last edited by sigerman; 10-21-2016 at 13:55.
sigerman is offline
ish12321
Veteran Member
Join Date: May 2016
Old 10-21-2016 , 14:22   Re: [ANY] City Bans
Reply With Quote #16

No database can ever detect every iP ...

Use a check to see if the string in which you store country is empty or not
If empty do not ban user...
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
ish12321
Veteran Member
Join Date: May 2016
Old 10-21-2016 , 14:25   Re: [ANY] City Bans
Reply With Quote #17

PHP Code:
gA_BannedCities ArrayCreate(128); 
Which city has so long name ?
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 10-21-2016 , 16:49   Re: [ANY] City Bans
Reply With Quote #18

Quote:
Originally Posted by ish12321 View Post
PHP Code:
gA_BannedCities ArrayCreate(128); 
Which city has so long name ?
Llanfairpwllgwyngyllgogerychwyrndrobwllllanty siliogogogoch.

Then again, only 60 characters.
__________________

Last edited by gabuch2; 10-21-2016 at 16:50.
gabuch2 is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-25-2016 , 23:54   Re: [ANY] City Bans
Reply With Quote #19

Quote:
Originally Posted by ish12321 View Post
PHP Code:
gA_BannedCities ArrayCreate(128); 
Which city has so long name ?
just for safety, didn't do researches about the longest city or whatever
this few extra cells won't reduce the performance of your server or cause resource hogging, trust me
__________________
retired
shavit is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 10-26-2016 , 05:11   Re: [ANY] City Bans
Reply With Quote #20

Longest city name is 58, make an 64 sized array, no sense to make it 128.
Or you think that goldscr will never die and in future humanity will create new cities and their names will go up to 127 characters. I haven't ever seen such paranoia .
siriusmd99 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode