Jump to content

Country Restrictions | CountryKick + CountryBAN 0.9 beta release


HectorNr666

Recommended Posts

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

<?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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

<?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 ?

Link to comment
Share on other sites

<?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

Link to comment
Share on other sites

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.

 


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

Link to comment
Share on other sites

*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

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.

Link to comment
Share on other sites

Country.xml

<?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]

Link to comment
Share on other sites

<?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...

Link to comment
Share on other sites

Ive checked that & nothing, NO mention of anything on here line by line, Is it possible that the MuratusMinibike mod is causing an issue as this is also in the mods folder

 

You got PM - better than filling up forum's thread ... using this as some kind of walkie talkie is really strange man... LOL :-)

Link to comment
Share on other sites

  • 3 months later...

on my server has started to give an error:

 

LOG FILE

2018-07-21T18:37:30 2621.869 INF Player connected, entityid=177, name=doberman811, steamid=76561198234973076, steamOwner=76561198234973076, ip=81.37.189.136
2018-07-21T18:37:30 2621.869 INF Player set to online: 76561198234973076
2018-07-21T18:37:30 2621.871 INF (BCM) Players Saved
2018-07-21T18:37:30 2621.871 INF [CountryRestrictions] Something on Users Data has changed. Trying to find out country for 76561198234973076 (81.37.189.136)
2018-07-21T18:37:33 2625.078 WRN [sERVERTOOLS] Detected doberman811, Steam Id 76561198234973076, flying @ 394 31 -2879. 
2018-07-21T18:37:36 2628.083 WRN [sERVERTOOLS] Detected doberman811, Steam Id 76561198234973076, flying @ 394 31 -2879. 
2018-07-21T18:37:39 2631.083 WRN [sERVERTOOLS] Detected doberman811, Steam Id 76561198234973076, flying @ 394 31 -2879. 
2018-07-21T18:37:42 2634.088 WRN [sERVERTOOLS] Detected doberman811, Steam Id 76561198234973076, flying @ 394 31 -2879. 
2018-07-21T18:37:45 2637.088 WRN [sERVERTOOLS] Detected doberman811, Steam Id 76561198234973076, flying @ 394 31 -2879. 
2018-07-21T18:37:48 2640.089 WRN [sERVERTOOLS] Detected doberman811, Steam Id 76561198234973076, flying @ 394 31 -2879. 
2018-07-21T18:37:51 2642.876 ERR [MODS] Error while executing PlayerSpawning on mod "CountryRestrictions"
2018-07-21T18:37:51 2642.877 EXC Error: ConnectFailure (Se produjo un error durante el intento de conexiَn ya que la parte conectada no respondiَ adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexiَn establecida ya que el host conectado no ha podido responder.
)
SocketException: Se produjo un error durante el intento de conexiَn ya que la parte conectada no respondiَ adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexiَn establecida ya que el host conectado no ha podido responder.

 at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 
 at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x00000] in <filename unknown>:0 
Rethrow as WebException: Error: ConnectFailure (Se produjo un error durante el intento de conexiَn ya que la parte conectada no respondiَ adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexiَn establecida ya que el host conectado no ha podido responder.
)
 at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
 at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0 
 at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in <filename unknown>:0 
 at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
ModManager:PlayerSpawning(ClientInfo, Int32, PlayerProfile)
GameManager:RequestToSpawnPlayer(ClientInfo, Int32, PlayerProfile)
NetPackageRequestToSpawnPlayer:ProcessPackage(World, INetConnectionCallbacks)
ConnectionManager:VN(INetConnection, NetPackageDirection)
ConnectionManager:Update()

(Filename:  Line: -1)

Couldn't send RPC function 'RPC_RawData'


(Filename:  Line: 2481)

Couldn't send RPC function 'RPC_RawData'


(Filename:  Line: 2481)

Couldn't send RPC function 'RPC_RawData'


(Filename:  Line: 2481)

Couldn't send RPC function 'RPC_RawData'


(Filename:  Line: 2481)

Couldn't send RPC function 'RPC_RawData'


(Filename:  Line: 2481)

Couldn't send RPC function 'RPC_RawData'


(Filename:  Line: 2481)

2018-07-21T18:37:51 2642.997 INF [NET] PlayerDisconnected EntityID=187, PlayerID='76561198004034353', OwnerID='76561198004034353', PlayerName='Pichojos'
2018-07-21T18:37:51 2642.998 INF Player set to offline: 76561198004034353

 

 

Country.xml

<?xml version="1.0" encoding="UTF-8"?>
<CountryCheck>
   <Country>
       <countryname name="China" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Indonesia" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Hong Kong" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Iran" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Iraq" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="India" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Ireland" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Japan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Kazakhstan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Korea, North" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Korea, South" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Kyrgyzstan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Nigeria" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Russia" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
       <countryname name="Taiwan" autokick="True" autoban="True" KickBasedOnLanguage="False" BanBasedOnLanguage="False"  />
	</Country>
</CountryCheck>

Link to comment
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...