• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Country Restrictions | CountryKick + CountryBAN 0.9 beta release

Hy there.

AND AT FIRST:

Thanks to OC and dmustanger for their work for servertools! Without their indirect motivation kick i wouldn't even be here anymore i guess :distrust:

* footnote: maybe OC will add this Module on servertools also, up to this upcoming release i'll share it as standalone module

My Little MOD enhances dedicated servers with possibilty to Kick or Ban players based on their Country (Sources will kept up to date / always-on LIVE IP databases).

because of many requests, I made a restricted version for all people of this Forum, where the key is already configured. You only have to unpack to your Server and define the countries.
Download (FORUM EDITION ONLY) here.

Password of ZIP File (same as Thread ID :-) --> 82841

For further Information or you like to use advanced Features like the Kick+BanBasedOnLanguage Feature, you have to use your Steam OpenID on http://services.alienhard.net.

The Country itself will be saved locally and generating ConfigFiles on a fresh start.

It's ONLY requesting from API the Country of player again if:

[1] Player is new to your Server

[2] IP of Player changed since last logon to your Server

Installation:

--------------

* Download and unpack to your 7daystodiededicated\Mods folder.

* Start Server.

* Edit the default config files, which will be created on first start on location <savegamefolder>\CountryRestrictions

Update the XML file to configure your own Countries

Code:
<?xml version="1.0" encoding="UTF-8"?>
<CountryCheck>
   <Country>
       <countryname name="Navezgane" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />
       <countryname name="Alexandria" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />
   </Country>
</CountryCheck>
Usage:

--------

*EDIT -New feature:

Added console command 'countrylist' (and shortcut:'cl') for follwowing output:

2018-04-07T09:03:43 2957.666 INF Executing command 'cl' by Telnet from *.1.2.3:370

Code:

4/7/2018 9:03:43 AM [CountryRestrictions] 76561198********* Name:R___ Country: Germany IP::*.*.*.*

4/7/2018 9:03:43 AM [CountryRestrictions] 76561197********* Name:I___ Country: Finland IP:*.*.*.*

4/7/2018 9:03:43 AM [CountryRestrictions] 76561197********* Name:K___ Country: Norway IP:::ffff:*.*.*.*

4/7/2018 9:03:43 AM [CountryRestrictions] 76561198********* Name:B___ Country: Russia IP:*.*.*.*

So it gonna show all online players and corresponding country.

*** Upcoming Version gonna include ***

-> Report Banned IPs / Banned SteamIDs

Any questions ? Visit my Discord https://discord.gg/hvDpcst | Send me PM | Post here on forum

 
Last edited by a moderator:
Its asks me to log in via Steam, No offence but I aint giving my steam details to any site other than steam lol.... Is there any way to use this without giving my personal details over ? Thanks

 
Its asks me to log in via Steam, No offence but I aint giving my steam details to any site other than steam lol.... Is there any way to use this without giving my personal details over ? Thanks
EDIT: I just released another version, which can be used WITHOUT Steam OpenID registration process.

Anyways, visit us and check it out for advanced features.

 
Last edited by a moderator:
because of many requests, I compiled a restricted version for all people of this forum, where the key is already configured. You only have to unpack to your Server and define the countries.

Download here.

Password (same as Thread ID :-) --> 82841

BR

Mike

 
Last edited by a moderator:
<?xml version="1.0" encoding="UTF-8"?>

<CountryCheck>

<Country>

<countryname name="Romania" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Russia" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Rwanda" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="China" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

</Country>

</CountryCheck>

<CountryRestrictions>

<Configuration>

<Config Name="Version=" Version="0.9" />

<Config Name="Active" Enable="True" />

<Config Name="CSAPI_key" Key="removed" />

</Configuration>

</CountryRestrictions>

Do I have this correct ?

 
Last edited by a moderator:
<?xml version="1.0" encoding="UTF-8"?><CountryCheck>

<Country>

<countryname name="Romania" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Russia" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Rwanda" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="China" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

</Country>

</CountryCheck>

<CountryRestrictions>

<Configuration>

<Config Name="Version=" Version="0.9" />

<Config Name="Active" Enable="True" />

<Config Name="CSAPI_key" Key="removed" />

</Configuration>

</CountryRestrictions>

Do I have this correct ?
Maybe rwanda is Ruanda, but rest seems to be fine

 
Does this give any visual indecation while on the server of it kicking anyone or does it do it silently & thanks :)

 
Does this give any visual indecation while on the server of it kicking anyone or does it do it silently & thanks :)
Yeah, look on console and / or text log.

Code:
2018-04-06T13:02:26 172.637 INF [CountryRestrictions] Something on Users Data has changed. Trying to find out country for 7656119********** (*1*.*5.*6.*2)
2018-04-06T13:02:26 172.682 INF [CountryRestrictions] API RESULT COUNTRY: Germany
2018-04-06T13:02:26 172.689 INF [CountryRestrictions] Values for Germany are autokick:True autoban:False KickLanguage:False BanLanguage:False 
2018-04-06T13:02:26 172.689 INF [CountryRestrictions] Autokick enabled for Germany 
2018-04-06T13:02:26 172.689 INF [CountryRestrictions] Auto Kicking Hector666 for joining from banned country: 1, banned SteamID: Germany
2018-04-06T13:02:26 172.695 INF Chat: 'Server': Auto Kicking Hector666 for joining from banned country: 1, banned SteamID: Germany
2018-04-06T13:02:26 172.697 INF Executing command 'Kick 225643 "Auto Kicked: Germany is on blacklist. Sorry!"'
[/CODE]

And try to delete: CountryRestrictions.bin file

 
Last edited by a moderator:
Does deleting the BIN file auto kick everyone (as in for testing) ? Thanks.....
...it's re-requesting (server reboot needed) each country for each player again and kicking / banning as defined on XML

 
Last edited by a moderator:
*EDIT -New feature:

Added console command 'countrylist' (and shortcut:'cl') for follwowing output:

2018-04-07T09:03:43 2957.666 INF Executing command 'cl' by Telnet from *.1.2.3:370

Code:
4/7/2018 9:03:43 AM [CountryRestrictions] 76561198********* Name:R___ Country: Germany IP::*.*.*.*
4/7/2018 9:03:43 AM [CountryRestrictions] 76561197********* Name:I___ Country: Finland IP:*.*.*.*
4/7/2018 9:03:43 AM [CountryRestrictions] 76561197********* Name:K___ Country: Norway IP:::ffff:*.*.*.*
4/7/2018 9:03:43 AM [CountryRestrictions] 76561198********* Name:B___ Country: Russia IP:*.*.*.*
So it gonna show all online players and corresponding country.

 
Last edited by a moderator:
Ive had 2 people join so far one whos chinese & 1 which says russian federation neither of them have been kicked so can someone please explain in great detail how my config should look please....

 
Country.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<CountryCheck>
    <Country>
        <countryname name="Russia" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />
        <countryname name="China" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />
    </Country>
</CountryCheck>
[/CODE]
 
<?xml version="1.0" encoding="UTF-8"?>

<CountryCheck>

<Country>

<countryname name="Romania" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Rwanda" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="China" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Russia" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Ukraine" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Belarus" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Kazakhstan" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Uzbekistan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Armenia" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Azerbaijan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Georgia" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Kyrgyzstan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Moldova" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Tajikistan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Turkmenistan" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Estonia" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Latvia" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

<countryname name="Lithuania" autokick="True" autoban="False" KickBasedOnLanguage="False" BanBasedOnLanguage="False" />

</Country>

</CountryCheck>

Thats what I have in my country.xml Still nothing on the server, No indecation of anything running in the back ground...

Tried to sign up using my spare Steam ACC & nothing happens lol... As soon as I put in the details your page loads up with all the same info about a restricted version...? So I give up now...

 
Last edited by a moderator:
Back
Top