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

Country Filter 2nd Edition


Post New Thread Reply   
 
Thread Tools Display Modes
Sarin
Senior Member
Join Date: Nov 2014
Location: Sydney, Australia
Old 12-28-2018 , 21:56   Re: Country Filter 2nd Edition
Reply With Quote #101

Quote:
Originally Posted by Bacardi View Post
https://github.com/alliedmodders/sourcemod/issues/913
https://github.com/alliedmodders/sourcemod/pull/914





Here zip pack (final ?).
GeoIP.dat.gz- 27.3.2018
Code:
 [GEOIP] GeoIP database info: GEO-106FREE 20180327 Build 1 Copyright (c) 2018 MaxMind Inc All Rights Reserved
thats a shame. Got mine for now. cheers
Sarin is offline
Sarin
Senior Member
Join Date: Nov 2014
Location: Sydney, Australia
Old 02-20-2019 , 01:03   Re: Country Filter 2nd Edition
Reply With Quote #102

I have had 2 that i know of with false identification. Both from AUS but saying overseas (think 1 was UK and Singapore)
Sarin is offline
LeetDonkey
Member
Join Date: Dec 2014
Old 09-05-2019 , 04:15   Re: Country Filter 2nd Edition
Reply With Quote #103

Using this script you can convert the new format to the legacy format:
https://github.com/sherpya/geolite2legacy
If you're a lazy bum like me, someone is already doing it:
https://www.miyuru.lk/geoiplegacy
LeetDonkey is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-11-2022 , 10:34   Re: Country Filter 2nd Edition
Reply With Quote #104

Minor update to first post. #1
GeoIP.dat no more supported.

Use GeoLite2 Country file GeoLite2-Country.mmdb
__________________
Do not Private Message @me
Bacardi is offline
JustNO
Member
Join Date: Jul 2020
Old 11-20-2022 , 04:08   Re: Country Filter 2nd Edition
Reply With Quote #105

Wy do i get this error, if I want to compile the sp file.? I tried that because since the change to use the GeoLite2-Country.mmdb the plugin doesn't work. I don't get any errors on my end, and I'm using the latest GeoLite2-Country.mmdb. The plugin worked fine with the GeoIP.dat until a few weeks ago. Uninstalled and installed everything several times, but the country filter no longer works.

Your plugin failed to compile! Read the errors below:

SourcePawn Compiler 1.11
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

/home/groups/sourcemod/upload_tmp/phpXGIHWg.sp(155) : error 047: array sizes do not match, or destination array is too small

1 Error.


Could you look into it?
JustNO is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-20-2022 , 08:31   Re: Country Filter 2nd Edition
Reply With Quote #106

For now, don't compile plugin source code with newer version of compiler (because this is old plugin code).

- Download *.smx file from Get Plugin link from first post.
- Download translation file
- Before you load plugin in server, remove GeoIP.dat from your server folder (...sourcemod/configs/geoip/)
Because it is outdated.
- Add new geoip file GeoLite2-Country.mmdb in same folder
- Reboot server, this way it load properly.


This is what I got:
Code:
Network: IP x mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Initializing Steam libraries for secure Internet server
No account token specified; logging into anonymous game server account.  (Use sv_setsteamaccount to login to a persistent account.)
L 11/20/2022 - 15:13:23: [GEOIP] GeoIP2 database loaded: GeoLite2-Country (2022-11-17 16:41:44 UTC) (G:\server\counter-strike source\cstrike\addons\sourcemod\configs\geoip\GeoLite2-Country.mmdb)
L 11/20/2022 - 15:13:23: [GEOIP] GeoIP2 supported languages: de en es fr ja pt-BR ru zh-CN
Executing dedicated server config file server.cfg
Using map cycle file 'cfg/mapcycle_default.txt'.  ('cfg\mapcycle.txt' was not found.)
Set motd from file 'cfg/motd_default.txt'.  ('cfg/motd.txt' was not found.)
Set motd_text from file 'cfg/motd_text_default.txt'.  ('cfg/motd_text.txt' was not found.)
SV_ActivateServer: setting tickrate to 66.7
Connection to Steam servers successful.
   Public IP is x.
Assigned anonymous gameserver Steam ID [A:1:978032648:21905].
Connection to Steam servers lost.  (Result = 3)
Connection to Steam servers lost.  (Result = 3)
Connection to Steam servers successful.
   Public IP is x
Assigned anonymous gameserver Steam ID [A:1:978032648:21905].
VAC secure mode is activated.
sm exts list
[SM] Displaying 11 extensions:
[01] Automatic Updater (1.11.0.6911): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6911): Extension for interacting with URLs
[03] CS Tools (1.11.0.6911): CS extended functionality
[04] BinTools (1.11.0.6911): Low-level C/C++ Calling API
[05] SDK Tools (1.11.0.6911): Source SDK Tools
[06] Top Menus (1.11.0.6911): Creates sorted nested menus
[07] Client Preferences (1.11.0.6911): Saves client preference settings
[08] SQLite (1.11.0.6911): SQLite Driver
[09] GeoIP (1.11.0.6911): Geographical IP information
[10] DHooks (1.11.0.6911): Dynamic Hooks
[11] SDK Hooks (1.11.0.6911): Source SDK Hooks
sm plugins list
[SM] Listing 23 plugins:
  01 "Admin File Reader" (1.11.0.6911) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6911) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6911) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6911) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6911) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6911) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6911) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6911) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6911) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6911) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6911) by AlliedModders LLC
  12 "Country Filter 2nd Edition" (2.0.4) by Bacardi
  13 "Delay or disable server hibernate" (13.3.2021) by Bacardi
  14 "Fun Commands" (1.11.0.6911) by AlliedModders LLC
  15 "Fun Votes" (1.11.0.6911) by AlliedModders LLC
  16 "kickplayers.smx"
  17 "kill_all_bots.smx"
  18 "ListIdtest.smx"
  19 "Nextmap" (1.11.0.6911) by AlliedModders LLC
  20 "Player Commands" (1.11.0.6911) by AlliedModders LLC
  21 "Reserved Slots" (1.11.0.6911) by AlliedModders LLC
  22 "Sound Commands" (1.11.0.6911) by AlliedModders LLC
  23 "test.smx"
Quote:
Originally Posted by JustNO View Post
Wy do i get this error, if I want to compile the sp file.? I tried that because since the change to use the GeoLite2-Country.mmdb the plugin doesn't work. I don't get any errors on my end, and I'm using the latest GeoLite2-Country.mmdb. The plugin worked fine with the GeoIP.dat until a few weeks ago. Uninstalled and installed everything several times, but the country filter no longer works.

Your plugin failed to compile! Read the errors below:

SourcePawn Compiler 1.11
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

/home/groups/sourcemod/upload_tmp/phpXGIHWg.sp(155) : error 047: array sizes do not match, or destination array is too small

1 Error.


Could you look into it?
Not sure has this change happen from this:
*nope. It has to be in compiler, not in geoip extension.

github commit
Code:
pCtx->StringToLocal(params[2], 3, ccode ? ccode : "");
to
pCtx->StringToLocalUTF8(params[2], 3, ccode, NULL);


Has mentioned here https://github.com/alliedmodders/sou...g-1.11.md#L148

Before https://sm.alliedmods.net/new-api/geoip/GeoipCode2 accept string variable bigger size than required.
But after change string has to exactly right size. Can not use oversize string variable.
__________________
Do not Private Message @me

Last edited by Bacardi; 11-20-2022 at 08:40. Reason: misiformation
Bacardi is offline
JustNO
Member
Join Date: Jul 2020
Old 11-20-2022 , 23:13   Re: Country Filter 2nd Edition
Reply With Quote #107

Hi there.

I did exactly as you described, but to no avail. I have the latest version of Geolite2-Country.mmdb ( Nov 17 2022 )

When I check sm exts list I see this: "GeoIP2" (1.1.1) by Accelerator, AlliedModders LLC: Geographical IP information and unfortunately the filter doesn't work.

EDIT:

In my log it says this:

L 11/21/2022 - 05:15:57: [GEOIP2] GeoIP2 database loaded: GeoLite2-Country (2022-11-17 16:41:44 UTC)
L 11/21/2022 - 05:15:57: [GEOIP2] GeoIP2 supported languages: de en es fr ja pt-BR ru zh-CN

No errors or other weird things.

Last edited by JustNO; 11-21-2022 at 00:51.
JustNO is offline
JustNO
Member
Join Date: Jul 2020
Old 11-26-2022 , 07:47   Re: Country Filter 2nd Edition
Reply With Quote #108

Anyone want to take a look at this plugin? It doesn't work in Linux. Got the latest version of sm, and geolite2. Or are there other, maybe better options for blocking countries?
JustNO is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-26-2022 , 11:11   Re: Country Filter 2nd Edition
Reply With Quote #109

Quote:
Originally Posted by JustNO View Post
Anyone want to take a look at this plugin? It doesn't work in Linux. Got the latest version of sm, and geolite2. Or are there other, maybe better options for blocking countries?
Show more information.

Code:
sm exts list
sm exts info <index number of GeoIP>

sm plugins list
sm cvars <index number of Country Filter 2nd Edition>
Looks like this
Code:
VAC secure mode is activated.
sm exts list
[SM] Displaying 12 extensions:
[01] Automatic Updater (1.11.0.6911): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6911): Extension for interacting with URLs
[03] CS Tools (1.11.0.6911): CS extended functionality
[04] BinTools (1.11.0.6911): Low-level C/C++ Calling API
[05] SDK Tools (1.11.0.6911): Source SDK Tools
[06] Top Menus (1.11.0.6911): Creates sorted nested menus
[07] Client Preferences (1.11.0.6911): Saves client preference settings
[08] SQLite (1.11.0.6911): SQLite Driver
[09] GeoIP (1.11.0.6911): Geographical IP information
[10] DHooks (1.11.0.6911): Dynamic Hooks
[11] SDK Hooks (1.11.0.6911): Source SDK Hooks
[12] Regex (1.11.0.6911): Provides regex natives for plugins
sm exts
SourceMod Extensions Menu:
    info             - Extra extension information
    list             - List extensions
    load             - Load an extension
    reload           - Reload an extension
    unload           - Unload an extension
Server is hibernating
sm exts info 09
 File: geoip.ext.dll
 Loaded: Yes (version 1.11.0.6911)
 Name: GeoIP (Geographical IP information)
 Author: AlliedModders LLC (http://www.sourcemod.net/)
 Binary info: API version 8 (compiled Aug  6 2022 23:36:49)
 Method: Loaded by SourceMod
sm plugins list
[SM] Listing 23 plugins:
  01 "Admin File Reader" (1.11.0.6911) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6911) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6911) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6911) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6911) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6911) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6911) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6911) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6911) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6911) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6911) by AlliedModders LLC
  12 "Country Filter 2nd Edition" (2.0.4) by Bacardi
  13 "Delay or disable server hibernate" (13.3.2021) by Bacardi
  14 "Fun Commands" (1.11.0.6911) by AlliedModders LLC
  15 "Fun Votes" (1.11.0.6911) by AlliedModders LLC
  16 "kickplayers.smx"
  17 "kill_all_bots.smx"
  18 "ListIdtest.smx"
  19 "Nextmap" (1.11.0.6911) by AlliedModders LLC
  20 "Player Commands" (1.11.0.6911) by AlliedModders LLC
  21 "Reserved Slots" (1.11.0.6911) by AlliedModders LLC
  22 "Sound Commands" (1.11.0.6911) by AlliedModders LLC
  23 "test.smx"
sm cvars 12
[SM] Listing 8 convars for: Country Filter 2nd Edition
  [Name]                           [Value]
  cf_adminimmunity                 0
  cf_allowlan                      0
  cf_allowunidentified             0
  cf_alphacode                     2
  cf_chatannouncements             1
  cf_chatusecode                   0
  cf_countries
  cf_mode                          0
__________________
Do not Private Message @me
Bacardi is offline
JustNO
Member
Join Date: Jul 2020
Old 11-27-2022 , 01:14   Re: Country Filter 2nd Edition
Reply With Quote #110

Hey there, check

Code:
 "Automatic Updater" (1.11.0.6917) by AlliedModders LLC: Updates SourceMod gamedata files
 "Webternet" (1.11.0.6917) by AlliedModders LLC: Extension for interacting with URLs
 "[L4D2] 8+ Players BugFixes" (1.0.2) by V10: This extension try fix some bugs on server have more than 8 players
 "SDK Tools" (1.11.0.6917) by AlliedModders LLC: Source SDK Tools
 "BinTools" (1.11.0.6917) by AlliedModders LLC: Low-level C/C++ Calling API
 "DHooks" (1.11.0.6917) by AlliedModders LLC: Dynamic Hooks
 "SDK Hooks" (1.11.0.6917) by AlliedModders LLC: Source SDK Hooks
 "GeoIP2" (1.1.1) by Accelerator, AlliedModders LLC: Geographical IP information
 "Top Menus" (1.11.0.6917) by AlliedModders: Creates sorted nested menus
 "Regex" (1.11.0.6917) by AlliedModders LLC: Provides regex natives for plugins
 "Client Preferences" (1.11.0.6917) by AlliedModders: Saves client preference settings
 "SQLite" (1.11.0.6917) by AlliedModders LLC: SQLite Driver
 "MySQL-DBI" (1.11.0.6917) by AlliedModders LLC: MySQL driver implementation for DBI
==

Code:
"Chat-Processor" (2.2.3) by Drixevel
 "SourceBans++: Admin Config Loader" (1.6.4) by AlliedModders LLC, SourceBans++ Dev Team
 "L4D2 Jockeyed Charger Fix" (1.5) by Visor, A1m`
 "SMAC Client Protection" (0.8.7.3) by SMAC Development Team
 "Country Filter 2nd Edition" (2.0.4) by Bacardi
 "[L4D AND L4D2] Cannounce Player Info" (2.0.0) by Ernecio
 "[L4D & L4D2] Simple AFK Manager VS" (1.2) by raziEiL [disawar1]
 "[L4D2]Survivor_Legs_Restore" (1.5.2) by Lux
 "SourceBans++: SourceComms" (1.6.4) by Alex, SourceBans++ Dev Team
==

Code:
L 11/21/2022 - 05:15:57: [GEOIP2] GeoIP2 database loaded: GeoLite2-Country (2022-11-17 16:41:44 UTC)
L 11/21/2022 - 05:15:57: [GEOIP2] GeoIP2 supported languages: de en es fr ja pt-BR ru zh-CN
==

My CFG settings

Code:
// This file was auto-generated by SourceMod (v1.11.0.6917)
// ConVars for plugin "country_filter_2nd_edition.smx"


// Admin immunity, 0 = Disabled, 1 = Enabled
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
cf_adminimmunity "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
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
cf_allowlan "0"

// Allow players connect from unidentified country, 0 = Disabled, 1 = Enabled
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
cf_allowunidentified "0"

// 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
// -
// Default: "2"
// Minimum: "2.000000"
// Maximum: "3.000000"
cf_alphacode "2"

// Print chat announcements to all players
// Usage 1+2 = 3 (Print allowed and rejected country connections)
// 0 = Off
// 1 = Allowed connections
// 2 = Rejected connections
// 4 = Allowed LAN connections
// 8 = Rejected LAN connections
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "15.000000"
cf_chatannouncements "0"

// Print country name in chat using, 0 = Country name, 1 = Country code
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
cf_chatusecode "0"

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

// 0 = Allow all expect cf_countries
// 1 = Allow only cf_countries
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
cf_mode "0
Thank you alr for your time
JustNO 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 03:54.


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