b0563a493c
* Add support for Maxmind GeoIP2 database files (#913). * Copy/paste error. * Mark GeoipCode3 as deprecated. * Fix build when compiling with AMBuild. * Replace loose libmaxminddb files with submodule. * Fix Linux build. * One more hack for submodule. * Actually fix Linux build. * GeoIP2 extension to sourcemod * Update basevotes When a player leaves during a voteban, he will be banned anyway. Also added a cvar with a ban time setting. * Update basevotes.sp * Update AMBuilder * ke::AString to std::string * Update extension.cpp * Update AMBuilder * Added coordination natives Added GeoipLatitude, GeoipLongitude, GeoipDistance natives. * Create osdefs.h * Update maxminddb_config.h * Update extension.cpp * Update extension.cpp * Added automatic search for database file * Fix automatic search for database file * Update extension.cpp * Update geoip.inc * .gitmodules revert * Update geoip.inc * Update libmaxminddb to version 1.5.2 * Update extension.cpp * Check language in the DB * Removed langCount variable * Determination of the client's language * Update geoip.inc * Update geoip.inc * Update extension.cpp * Update geoip.inc * Update extension.cpp * space instead of tab in .inc * Update extension.cpp * Update geoip.inc * Optimizing length measurement region code * Update package script to fetch the new GeoLite2 database This package is the last CC-BY-SA licensed GeoLite2-City database extracted from https://src.fedoraproject.org/rpms/geolite2 from december 2019. This doubles the download size for SM packages, but it's what we have to deal with atm :( * Fix potentially returning uninitialized memory in GeoipRegionCode If the lookup failed, we'd copy back whatever is on the stack in the ccode buffer. Co-authored-by: Nick Hastings <nshastings@gmail.com> Co-authored-by: Headline <michaelwflaherty@me.com> Co-authored-by: Accelerator74 <dmitry@447751-accele74.tmweb.ru> Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
22 lines
638 B
Python
22 lines
638 B
Python
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
import os
|
|
|
|
for cxx in builder.targets:
|
|
binary = SM.ExtLibrary(builder, cxx, 'geoip.ext')
|
|
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
|
binary.compiler.cxxflags += ['-fno-rtti']
|
|
elif binary.compiler.family == 'msvc':
|
|
binary.compiler.cxxflags += ['/GR-']
|
|
if binary.compiler.target.platform == 'windows':
|
|
binary.compiler.postlink += ['wsock32.lib', 'ws2_32.lib']
|
|
|
|
binary.sources += [
|
|
'extension.cpp',
|
|
'geoip_util.cpp',
|
|
'../../public/smsdk_ext.cpp',
|
|
'data-pool.c',
|
|
'maxminddb.c',
|
|
]
|
|
|
|
SM.extensions += [builder.Add(binary)]
|