Raised This Month: $ Target: $400

[ANY] City Bans

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Plugin ID:
Plugin Version:
Plugin Category:
Admin Commands
Plugin Game:
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Allows admins to ban users by their city
    Old 06-11-2013 , 20:35   [ANY] City Bans
    Reply With Quote #1

    [ANY] City Bans


    Allows admins to ban users by their city.

    • sm_bancity <target> - bans a client by their city (default flag ban)
    • sm_listbannedcities - prints a list of banned cities (default flag unban)
    • sm_unbancity <id> - unbans a city (use sm_listbannedcities to get the ID) (default flag unban)

    • city_bans_version - plugin version
    • city_bans_f2p - only block Free2Play players in banned cities from connecting (only works in TF2, requires SteamTools), defaults to 1
    • city_bans_message - message to display to banned players, defaults to "You have been banned"

    Admins with access to the "BypassCityBan" override (defaults to root) won't be blocked when they join from banned cities.

    City Bans requires a database to store bans in. It will first look for a "citybans" configuration in databases.cfg, then for a "default" configuration. Here's a citybans configuration that uses a local SQLite database (no database server required):

            "driver"            "sqlite"
            "database"            "citybans"
    You can also configure it to use a MySQL database to sync bans across servers.

    Requires the GeoIPCity extension, and optionally SteamTools for TF2 F2P blocking.

    Install GeoIPCity if you don't have it already (and optionally SteamTools), put citybans.smx into /addons/sourcemod/plugins, and reboot your server or type "sm plugins load citybans" into your console or rcon.

    Auto Update:
    Install Updater. The plugin will be auto-updated according to your Updater settings. It'll work without Updater.

    • v1.1.0 (7/16/13)
      • Removed quotes requirement in sm_bancity
      • Fixed a couple of issues
    • v1.0.0 (6/11/13)
      • Initial release

    Download Plugin (citybans.smx)
    View Source (citybans.sp)

    Requires updater.inc, mckayupdater.sp, geoipcity.inc, and steamtools.inc to compile.

    Last edited by Dr. McKay; 07-14-2020 at 05:38.
    Dr. McKay is offline

    Thread Tools
    Display Modes

    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 00:02.

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