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

[ANY] City Bans


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-17-2016 , 13:01   [ANY] City Bans
Reply With Quote #1

Requires AMX Mod X 1.8.3 and above and the MaxMind2-City database (extract to amxmodx/data)..

*Attempt* of porting City Bans for SourceMod.
Requested here: https://forums.alliedmods.net/showpo...3&postcount=14

Description:
Allows banning of certain cities. (Just remember that GeoIP is not 100% accurate, and you might be facing false bans)

How to use:
Get the source file, compile it locally with the AMX Mod X 1.8.3-dev compiler and install it like any other plugin. (or use the attached .amxx file)
Create a file called citybans.txt in amxmodx/configs/ and list cities inside it. It's case insensitive and new lines are separators.

Note: Admins from banned cities will also be kicked.
Attached Files
File Type: sma Get Plugin or Get Source (cityban.sma - 1570 views - 1.6 KB)
__________________
retired

Last edited by shavit; 10-19-2016 at 00:29.
shavit is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-17-2016 , 13:25   Re: [ANY] City Bans
Reply With Quote #2

Hi,

1. Only approvers may upload `.amxx` file, so remove it.
2. May you provide an example of config file and how to get correctly the cities names to put on it?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-17-2016 , 13:29   Re: [ANY] City Bans
Reply With Quote #3

Quote:
Originally Posted by addons_zz View Post
Hi,

1. Only approvers may upload `.amxx` file, so remove it.
2. May you provide an example of config file and how to get correctly the cities names to put on it?
1. it's not like i'm going to upload a malicious file (considering i even attached the source) but whatever floats your boat.. the geoip module isn't in the old 1.8.1 compiler so i had to
2.

Code:
Tel Aviv
New York
Chicago
Berlin
Paris
__________________
retired
shavit is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 10-17-2016 , 14:48   Re: [ANY] City Bans
Reply With Quote #4

You wont be able to ban this city

https://www.youtube.com/watch?v=fHxO0UdpoxM
safetymoose is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-17-2016 , 14:50   Re: [ANY] City Bans
Reply With Quote #5

Thanks,

Quote:
Originally Posted by shavit View Post
1. it's not like i'm going to upload a malicious file (considering i even attached the source)
Just because you attached the source, does not mean that the binary is the compiled from that source without modification. You would need to compile the source, decompile it and your attached source and compare them to know they are exactly the same.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 10-17-2016 at 14:51. Reason: misspelling
addons_zz is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-17-2016 , 15:46   Re: [ANY] City Bans
Reply With Quote #6

Quote:
Originally Posted by safetymoose View Post
You wont be able to ban this city

https://www.youtube.com/watch?v=fHxO0UdpoxM
I was prepared!

__________________
retired
shavit is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 10-17-2016 , 16:54   Re: [ANY] City Bans
Reply With Quote #7

Nice! I will test It!

I'm going to need this, right? http://geolite.maxmind.com/download/...2-City.mmdb.gz

Seems to be working fine by now! I'll test It more tomorrow

Last edited by sigerman; 10-17-2016 at 21:52.
sigerman is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-17-2016 , 22:51   Re: [ANY] City Bans
Reply With Quote #8

Quote:
Originally Posted by sigerman View Post
Nice! I will test It!

I'm going to need this, right? http://geolite.maxmind.com/download/...2-City.mmdb.gz

Seems to be working fine by now! I'll test It more tomorrow
It should be fine without this file, I believe it's distributed with AMXX.
__________________
retired
shavit is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 10-18-2016 , 14:02   Re: [ANY] City Bans
Reply With Quote #9

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
sigerman is offline
ish12321
Veteran Member
Join Date: May 2016
Old 10-18-2016 , 15:43   Re: [ANY] City Bans
Reply With Quote #10

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
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 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 04:46.


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