Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoIP.dat 0 KB, server crashing when using geoip functions. #951

Closed
5 of 6 tasks
joao-mambelli opened this issue Jan 16, 2019 · 4 comments
Closed
5 of 6 tasks

GeoIP.dat 0 KB, server crashing when using geoip functions. #951

joao-mambelli opened this issue Jan 16, 2019 · 4 comments
Labels

Comments

@joao-mambelli
Copy link

joao-mambelli commented Jan 16, 2019

Help us help you

  • I have checked that my issue doesn't exist yet.
  • I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
  • I can always reproduce the issue with the provided description below.

Environment

  • Operating System version: Windows 10 Pro
  • Game/AppID (with version if applicable): CS:GO/730
  • Current SourceMod version: 1.9.0.6274
  • Current SourceMod snapshot:
  • Current Metamod: Source snapshot:

Description

Server crashes with no log when trying to use geoip functions. It has to do with the 1.9.0.6274 GeoIP.dat file being 0 KB. Using the previous version of GeoIP.dat won't crash the server.

Problematic Code (or Steps to Reproduce)

This script will crash the server as soon as a player connects.

#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <geoip>
#include <cstrike>
#undef REQUIRE_PLUGIN
#undef REQUIRE_EXTENSIONS

#pragma newdecls required

public void OnClientPostAdminCheck(int client)
{
  if (client == 0)
  {
  	return;
  }
  
  char ip_address[14];
  GetClientIP(client, ip_address, sizeof(ip_address));
  
  char country[3];
  GeoipCode2(ip_address, country);
  PrintToServer("%s", country);
}
@asherkin
Copy link
Member

Thanks for the report! I'm going to WontFix this as we're moving away from the legacy GeoLite data in #914, but the builds have been fixed to no longer have the broken data file.

@joao-mambelli
Copy link
Author

Wait, now the last release of sourcemod includes a working GeoIP.dat. Is that already GeoLite2? I'm kinda confused... What is suppose to change from the GeoLite to GeoLite2 support? Will sourcemod functions change or will be the same?

Sorry for the lack of knowledge.

@Bara
Copy link
Contributor

Bara commented Jan 19, 2019

It should be the last version of GeoIP1. GeoIP2 is still in dev. and not merged yet: #914

@joao-mambelli
Copy link
Author

Oh, ok, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants