This imports the brand new SourcePawn compiler. The new compiler is much
faster to compile and generates significantly improved code around
array generation and array access.
There are a number of compatibility changes in the new compiler. Most of
these are due to improved type checking and error detection. The full
list of notes can be found here:
https://github.com/alliedmodders/sourcepawn/blob/master/docs/upgrading-1.11.md
Additionally, .smx files generated by the new compiler will NOT load on
earlier versions of SourceMod, including earlier versions of 1.11. Old
plugins will continue to load as normal.
This rounds out the work started in #1548 to complete support for
reading the older SendPropArray type array netprops, along with bringing
SDKTools' GameRule netprop code in sync with core to add string array
support.
There aren't many SendPropArray type props around but this opens up a
few interesting opportunities for plugin developers, particularly in
L4D2 with manipulation of the EMS HUD.
Tested reading the `m_vCPPositions` array in TF2, and reading/writing
the `m_szScriptedHUDStringSet` EMS HUD netprop in L4D2. Closes#1386.
Similar to the recent work for commands, track and expose the creating
plugin for convars. The first plugin to register a given cvar becomes
the owner until that plugin is unloaded. If a plugin attempts to
register a convar that was already registered and the originally
registering plugin has been unloaded, that plugin becomes the owner.
This isn't quite as nice as the way commands shift "ownership" as
plugins are unloaded, but we don't have a sane data structure currently
to implement that, and it seemed like a lot of unnecessary work as there
shouldn't really be multiple plugins with conflicting cvars.
Closes#1492
The change in behaviour to the OnLevelInit forward params isn't obvious
when compiling a plugin, deprecate it to make it a lot more obvious that
something has changed.
Some plugins rely just on the timing of OnLevelInit rather than doing
anything with the entity lump, for these plugins offer a new OnMapInit
forward that is implemented in core rather than sdkhooks. If / when we
offer a new entity lump manipulation API in the future this'll be the
forward where it can be used to make changes.
Newer Source engine versions now use a dynamically allocated buffer for
the map entity lump, and some maps have over 16MB of entity data - far
larger than our 2MB limit.
There is no sane way we can currently handle this, so just remove the
functionality from the forward until a more comprehensive API can be
designed.
Fixes#1470
This increases the buffer for the map to be consistent with the other calls to GetCurrentMap. Also `currentmap` now uses the map's display name similar how `nextmap` uses it.
* 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>
This system is a bit sketchy but I didn't want to rework the entire thing. (If this were to be reworked, it should probably use ReplyToCommand for a lot of this).
This also allows the server to call ff and get a result.
* Add new method - Converts a bit string to a string of flag characters
* New syntax
* Set tags
* Fix tags
* Change method name
* Remove for - set null only once
* Execute ConVarQueryFinished if client disconnects
So people passing handles to the extra data can close them, adds a new return value to check if this happened
* Update based on suggestion
Co-authored-by: Asher Baker <asherkin@limetech.io>
* Update based on notes
* Normalize
* Pass along cookie handle instead of invalid
Co-authored-by: Asher Baker <asherkin@limetech.io>
* Add PostgreSQL DBI extension
Bug #3849
This adds a postgresql database driver called "pgsql".
The ambuild script changes could be very wrong ;)
* Add pgsql support to clientprefs
This was originally made by Lyfe in bug 3849! Thanks for that.
PostgreSQL supports the 'IF NOT EXISTS' clause when creating tables
since version 9.1, so i've switched to use that.
* Added pgsql support to sql-admin-manager
* Add --pgsql-path to ambuild configure
* More ambuild fixes
* Compile libpq with ambuild
* Try to generate postgres configs
* Add dummy config file
* More ambuild fixes
* Get errorcode and readable error in preparequery
No need to stop getting the errorCode, if the error string should be
retrieved. Just return both!
* Fix indentation in AMBuilderPGSQL
* Try to patch and configure postgres through ambuild
* Revert "Try to patch and configure postgres through ambuild"
This reverts commit 68dfc82b8eb0ce11f621af67ec247b5f47e4a189.
* Update to use PostgreSQL 9.4
* Move postgres preparation into seperate script
Fetching, preparing and configuring of the postgresql sourcecode
is done in a seperate prepare_postgresql.sh script now.
People can use this script for their manual builds,
if they don't want to use checkout-deps.sh.
* Add patch to configure.in again
Remove the version check for autoconf in postgres 9.4 too.
* Nit: Support older objdirs for hasPgSql ambuild option
* Update to use PostgreSQL 9.4.6
* Use newer AMTL and PGSQL 9.6
* Fix threaded queries
When running the thread part of a query, it already gets the atomic
lock. Don't try to get it twice in that case.
Use a seperate lock to protect access to the lastInsertID and
lastAffectedRows variables.
* Fix SetCharacterSet racing with threaded queries
Same fix like in the mysql driver.
* Use ke::AutoLock for lastInsertID mutex
* Fix fetching one more row than available
Don't try to access a row that doesn't exist when iterating rows.
* Improve sanity checks on column access
Don't call libpq functions with out of bounds column indices.
* Let QuoteString return false if quoting failed
* Fix build for x64 support changes and update to PGSQL 9.6.9
* Fix linux build
* Fix building of connection options string
snprintf doesn't support overlapping buffers.
* Update to PostgreSQL 9.6.15
* Fix crash after freeing first IQuery object
* Fix code crunch
* Fix memory leak, cleanup
* Nuke MSVC project and Makefile
* Remove unsupported numeric error codes
* Use STL threads
* Add prebuilt libpq for Linux and Windows
* Restore and fix version.rc file
* Add PostgreSQL build instructions
* Add prebuilt libpq for Mac
* Add win64 libpq build
This is version 9.6.15 since that's what I still had laying around.
* Fix buildscript
* Fix x64 build on linux and mac
Co-authored-by: Erik Minekus <tsunami@tsunami-productions.nl>
This bug was found as part of justCTF 2020 in the PainterHell challenge by cypis. Thank you!
Admins with the root flag could inject their own queries towards the admin database connection.
The sql-admin-manager plugin is disabled by default.