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

Country Filter 2nd Edition


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Plugin ID:
2113
Plugin Version:
2.0.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow or reject certain countries connect to your server.
    Old 12-05-2010 , 11:14   Country Filter 2nd Edition
    Reply With Quote #1

    *Mute Version, not mine
    country_filter_2nd_edition_mute by r3dw3r3w0lf

    Country Filter 2nd Edition
    - Allow or reject certain countries connect to your server.


    First for all, credits to original Country Filter by Knagg0
    Top
    Country Filter 2nd Edition Admin immunity
    Country Filter 2nd Edition CVARS
    Country Filter 2nd Edition Installation
    Update SourceMod GeoLite2-Country.mmdb
    Changelog

    This version features.
    • Ignore BOT (and admin connections in cf_adminimmunity 1)
    • Configure chat announce
    • Admin immunity (Not recomended use if want reject players more quicly)
    • Option allow or deny unidentified countries connections (Happens when GeoLite2-Country.mmdb is outdated or unknow location)
    • Option allow or deny LAN connections


    Country Filter 2nd Edition Admin immunity Top
    - Default adminflag reservation (a). Can override to different flag using cf_immunity
    - example in admin_overrides.cfg
    Code:
    Overrides
    {
        /**
        *
        * INSTRUCTIONS
        */
    
        "cf_immunity"    "z"
    }
    or alternative way override in admin_groups.cfg
    Code:
    Groups
    {
        /**
        *    INSTRUCTIONS
        */
    
        "vip"
        {
            Overrides
            {
                "cf_immunity"    "allow"
            }
        }
    }
    Country Filter 2nd Edition CVARS Top
    - Plugin generate own config file in ...cfg/sourcemod/country_filter_2nd_edition.cfg
    Quote:
    cf_adminimmunity "0"
    // Admin immunity, 0 = Disabled, 1 = Enabled

    cf_allowlan "0"
    // Allow players connect from LAN, 0 = Disabled, 1 = Enabled
    // IP 10.x.x.x
    // IP 127.x.x.x
    // IP 169.254.x.x
    // IP 192.168.x.x
    // IP 172.16.x.x - 172.31.x.x

    cf_allowunidentified "0"
    // Allow players connect from unidentified country, 0 = Disabled, 1 = Enabled

    cf_alphacode "2"
    // Choose what code type use in cf_countries
    // 2 = ISO 3166-1 alpha-2 codes (GB JP US)
    // 3 = ISO 3166-1 alpha-3 codes (GBR JPN USA)
    // http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes

    cf_chatannouncements "1"
    // Print chat announcements to all players
    // Usage 1+2 = 3 (Print allowed and rejected country connections)
    // 0 = Off
    // 1 = Allowed connections Player connected (Name)
    // 2 = Rejected connections Dropped from server (Country Name not allowed join into this server)
    // 4 = Allowed LAN connections Player connected (LAN IP)
    // 8 = Rejected LAN connections Dropped from server (LAN IP not allowed join into this server)

    cf_chatusecode "0"
    // Print country name in chat using, 0 = Country name, 1 = Country code

    cf_countries ""
    // List countries
    // example alpha 2 codes: "GB JP US"
    // example alpha 3 codes: "GBR JPN USA"

    cf_mode "0"
    // 0 = Allow all expect cf_countries
    // 1 = Allow only cf_countries
    Country Filter 2nd Edition Installation Top
    - Download country_filter_2nd_edition.smx and move in server ...addons/sourcemod/plugins/
    - Download country_filter_2nd_edition.phrases.txt and move in ...addons/sourcemod/translations/
    - If you upgrade country filter from previous version
    Unload + delete plugin, translation file and config file. Then reboot server.
    After reboot, install new plugin with files back on server.



    Update SourceMod GeoLite2-Country.mmdb Top
    - Here link GeoLite2 Free Geolocation Data
    - You need Sign Up
    - After that get "GeoLite2 Country" GZIP file GeoLite2-Country_YYYYMMDD.tar.gz from “Download Files”
    Extract zip file with 7Zip or else few times, you find GeoLite2-Country.mmdb

    Use remote control (rcon) or server console input
    sm exts list (Look GeoIp number)
    sm exts unload number (This not maybe unload yeat, it print command what you need use)
    sm exts unload number number

    Move downloaded GeoLite2-Country.mmdb in your server ...addons\sourcemod\configs\geoip\
    Change level/map




    Changelog Top
    Code:
    Version 2.0.0, 5.12.2010
    - Released
    
    Version 2.0.1, 6.12.2010
    - Remove cvar 'cf_adminimmunityflag'
    - Change check admin immunity , default flag "a"
    can override now in SM using cf_immunity
    Help found in #8
    
    version 2.0.2, 11.12.2010
    - Little fix in adminimmunity, "after rejected somebody it print extra 'printallowed'"
    - Added some sort LAN detection with cvars
    
    version 2.0.3, 2.2.2011
    - Fix LAN detection, ip range     172.16.0.0 - 172.31.255.255
    
    version 2.0.4, 19.3.2011
    - rewrite whole crab
    - Can use country alpha code 2 or 3
    - Print country by name or code in chat annouchements
    - Change translation UTF-8, removed colored text (less chat color spam)
    
    Minor change, not need update. version 2.0.4, 9.4.2011
    - I just correct operator conditional ?:
    Attached Thumbnails
    Click image for larger version

Name:	flags.gif
Views:	32306
Size:	31.8 KB
ID:	78570  
    Attached Files
    File Type: txt country_filter_2nd_edition.phrases.txt (1.1 KB, 4143 views)
    File Type: sp Get Plugin or Get Source (country_filter_2nd_edition.sp - 6584 views - 7.7 KB)

    Last edited by Bacardi; 10-11-2022 at 10:36. Reason: updated to use GeoLite2-Country.mmdb
    Bacardi is offline
    FrozDark
    BANNED
    Join Date: May 2010
    Location: Kazakhstan, Shymkent
    Old 12-06-2010 , 00:36   Re: Country Filter 2nd Edition
    Reply With Quote #2

    sorry, I forgot that I can edit

    english and russian translations v.2.0.2
    Attached Files
    File Type: txt country_filter_2nd_edition.phrases.txt (2.0 KB, 1186 views)

    Last edited by FrozDark; 12-15-2010 at 00:00.
    FrozDark is offline
    Send a message via Skype™ to FrozDark
    Stoffel
    Junior Member
    Join Date: Mar 2009
    Location: Germany
    Old 12-08-2010 , 12:03   Re: Country Filter 2nd Edition
    Reply With Quote #3

    Hi,

    thx for this nice plugin. It works perfect but i have a small problem with it. My gameserver stands local in my network and i cant connect the gameserver any more with this plugin. I always get the message:
    "Disconnect: Your unidentified country () isn't allowed on this server.
    D"
    I activated the admin immunity but it dont help. I Cant join the server.
    Can it be that local connects to an internet server are not recognized?
    i switched the allowed countrys list to forbidden country list and clear the list completely but i cant connect too.

    I´ll be very happy if you can help :-)

    Hope to here from you
    Stoffel

    PS:Maybe simply add ignoring local connections like ignoring "ignoring Bot connections"
    __________________

    Last edited by Stoffel; 12-08-2010 at 13:13.
    Stoffel is offline
    Send a message via ICQ to Stoffel Send a message via AIM to Stoffel Send a message via MSN to Stoffel
    FrozDark
    BANNED
    Join Date: May 2010
    Location: Kazakhstan, Shymkent
    Old 12-10-2010 , 03:32   Re: Country Filter 2nd Edition
    Reply With Quote #4

    Bacardi
    You can add to the plugin LAN detection
    FrozDark is offline
    Send a message via Skype™ to FrozDark
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 12-10-2010 , 03:54   Re: Country Filter 2nd Edition
    Reply With Quote #5

    Ok... I (maybe) add that. -.-

    Last edited by Bacardi; 12-10-2010 at 17:52.
    Bacardi is offline
    Stoffel
    Junior Member
    Join Date: Mar 2009
    Location: Germany
    Old 12-10-2010 , 06:16   Re: Country Filter 2nd Edition
    Reply With Quote #6

    Hi,

    thanks for the answer. I know that the plugin can use this two cvars but they dont work for me with local connection. Or i configured it wrong.

    cf_allowunidentified "1"
    cf_adminimmunity "1"

    Both of that cvars dont let me login to the server ;-)

    Thx anyway
    Stoffel ;-)
    __________________
    Stoffel is offline
    Send a message via ICQ to Stoffel Send a message via AIM to Stoffel Send a message via MSN to Stoffel
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 12-10-2010 , 08:12   Re: Country Filter 2nd Edition
    Reply With Quote #7

    Quote:
    Originally Posted by Stoffel View Post
    Hi,

    thanks for the answer. I know that the plugin can use this two cvars but they dont work for me with local connection. Or i configured it wrong.

    cf_allowunidentified "1"
    cf_adminimmunity "1"

    Both of that cvars dont let me login to the server ;-)

    Thx anyway
    Stoffel ;-)
    If could only know better what you have done...

    Try this.. set
    Code:
    cf_mode "2"
    cf_countries ""
    cf_adminimmunity "0"
    cf_allowunidentified "1"
    - save cfg, change level or reboot server
    Now Country Filter would not filter/block anyone. I'm 99% sure and have tested (listen server, srcds in LAN).

    - If you still get blocked by CF, please use rcon (or type in srcds input) to get current CVAR values from server.

    rcon sm cvars country_filter_2nd_edition

    or in that srcds input
    sm cvars country_filter_2nd_edition

    waiting answers
    ...



    *UPDATE V2.0.2

    -Little fix when use admin immunity, It print in chat extra even player rejected from server.
    -I added some sort LAN detection... and it will show those by LAN ip instead unidentified country.

    Download both, translation and plugin if you want upgrade.

    TRICK, to get new cvars in plugin config file.
    Cut+move or delete ...cfg/sourcemod/country_filter_2nd_edition.cfg file.
    and change level or reboot server.
    Edit new configuration file again.

    Last edited by Bacardi; 12-12-2010 at 02:35.
    Bacardi is offline
    geNesis177
    Member
    Join Date: Jun 2010
    Old 12-13-2010 , 13:14   Re: Country Filter 2nd Edition
    Reply With Quote #8

    wtf???

    cf_mode "1"

    cf_countries "RU UA LV KZ"

    Why German player is on my server???
    geNesis177 is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 12-13-2010 , 14:14   Re: Country Filter 2nd Edition
    Reply With Quote #9

    Quote:
    Originally Posted by geNesis177 View Post
    wtf???

    cf_mode "1"

    cf_countries "RU UA LV KZ"

    Why German player is on my server???
    Could you check current cvars from server using rcon (or type in srcds input without rcon)
    rcon sm plugins list
    rcon sm cvars number (plugin list number)

    And you could also peek in ...addons/sourcemod/logs/
    can you find error logs about from this plugin.
    Bacardi is offline
    geNesis177
    Member
    Join Date: Jun 2010
    Old 12-20-2010 , 11:49   Re: Country Filter 2nd Edition
    Reply With Quote #10

    Quote:
    [SM] Listing 11 convars for: Country Filter 2nd Edition
    [Name] [Value]
    cf_adminimmunity 0
    cf_allowlan 0
    cf_allowunidentified 1
    cf_countries RU UA LV LT KZ RB BR
    cf_mode 1
    cf_printadminannounce 0
    cf_printallowed 0
    cf_printallowedlan 0
    cf_printrejected 0
    cf_printrejectedlan 0
    cf_version 1.1.2
    Quote:
    sm plugins load country_filter_2nd_edition
    L 12/20/2010 - 19:47:24: [SM] Warning(s) encountered in translation file "country_filter_2nd_edition.phrases.txt"
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 5.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 11.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 17.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 23.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 29.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 35.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 41.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 47.
    L 12/20/2010 - 19:47:24: [SM] Ignoring translation to invalid language "#format" on line 53.
    [SM] Loaded plugin country_filter_2nd_edition.smx successfully.
    geNesis177 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 06:11.


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