Commit Graph

6677 Commits

Author SHA1 Message Date
Vauff
47c050d5b6
Update TerminateRound signature for CS:GO windows (#1486) 2021-04-29 01:24:26 -07:00
peace-maker
1fbe5e1daa
A2S_Rules fix: Only change host_rules_show if patching was successful (#1459)
If lookup of the patch location failed, don't turn on responding to A2S_Rules queries. Otherwise we'll see the log getting spammed with too large packet sizes again. #1447
2021-04-19 09:33:36 +02:00
yourmnbbn
2b1cc43355
Correct documentation in adt_trie.inc (#1465) 2021-04-04 15:11:30 -07:00
Arthurdead
62cb6a0458
Add sdk'less sample_ext and update -std to 14 (#1456) 2021-03-29 22:12:45 +01:00
Arron Vinyard
ca1dcc9bed
Correct spelling in sample_ext build script (#1454)
I have optimizaied the spelling
2021-03-24 21:05:14 +01:00
Vladimir
5a72644486
Add ConVar.GetDescription() method (#1449)
* Add ConVar.GetDescription() method

Issue #1432

* Update basecommands.sp

Add prints description of ConVar

* Revert "Update basecommands.sp"

This reverts commit ad485069a837f602bdeeeb50f9e02452b3860ecd.

* Remove GetConVarDescription() function
2021-03-21 15:10:17 +01:00
Vladimir
e552466886
core: Call SetGlobalTarget in PrintToConsole (#1448)
Issue #1443
2021-03-20 22:24:06 -07:00
Corey D
65043baf5d
gamedata: Add support for hexadecimal offsets (#1426)
* Allow hexadecimal and octal offsets

* Fix typo

* Allow hexadecimal input in Addresses "read" and "offset" values

Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2021-03-15 12:46:04 -07:00
Deathreus
46c54f829c
core: Call ConVarQueryFinished on client disconnect (#1384)
* 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>
2021-03-15 12:44:03 -07:00
steph
4dd5ab7576
Prevent duplicate map changes in randomcycle.sp (#1428) 2021-03-14 01:02:42 -08:00
MartLegion
ee27a48714
Update clientprefstest.sp to newdecls (#1442) 2021-03-13 23:41:36 -08:00
peace-maker
e5342afe2a
Add PostgreSQL database driver (#32)
* 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>
2021-03-11 11:21:51 +01:00
Peace-Maker
3c30f7b971 Fix crash when creating threads with Thread_AutoRelease
Setting the Thread_AutoRelease flag (default when using IThreader::MakeThread) caused a use-after-free after running the thread body.
2021-03-11 09:48:39 +01:00
Headline
99c39b1d57
Update IPlugin reference on cmd hook removal (#1439) 2021-03-10 15:21:57 -08:00
Nicholas Hastings
ae485c3115
Add A2S_Rules fix for CS:GO to CStrike extension. (#614)
* Add A2S_Rules fix for CS:GO to CStrike extension.

* Dont force set the cvar. Add checks before patching.

* Remove incorrect and useless check.

* Remove checking value as it is in the signature.

* Update build script changes to AMBuild 2.1 API to fix build.

* Fix bad check and ConVarRef being resolved too early.

* Whoops. This line is kinda important. Got nuked when refactoring.

* Remove unused variable.

* Updatet gamedata.

* Switch to "Addresses" gamedata lookup

* Add linux64 gamedata

* Fix mac build

Co-authored-by: Ruben Gonzalez <drifter01620@gmail.com>
Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2021-03-08 22:42:32 +00:00
Scags
6c2be9bdcc
Add sm_dump_datamaps_xml (#1409) 2021-03-08 14:28:43 -08:00
BotoX
1a11d92fd9
core: Add client id to MultiTargetFilter forward (#1070)
* Added client id to MultiTargetFilter forward.

* Add CapabilityProvider for MultiTargetFilter client param
2021-03-08 10:04:11 -08:00
Loïc
52c4d08e15
Improve logging on map/generic votes (#1362) 2021-03-08 05:02:20 -08:00
peace-maker
6ea1e39ee4
core/sm: Harden plugin loading path requirements (#1437)
* Harden plugin loading path requirements

Restrict loading of plugins to the `sourcemod/plugins` folder and require the `.smx` file extension.

Symlinks inside the `plugins` folder are fine.

This behavior was abused as part of justCTF 2020 in the PainterHell challenge by cypis. Thank you!

* Restrict extension loading to extensions folder

* Add NULL file extension check in LoadExtension

hi @KyleS
2021-03-07 14:33:33 -08:00
Deathreus
f9633a5f6f
Universalize a single call to srand() on map init (#1422) 2021-03-07 04:54:27 -08:00
peace-maker
5bc48b2ab3
Prefer python3 over python(2) in checkout-deps (#1424)
* Prefer python3 over python(2) in checkout-deps

We require Python 3 and don't want to accidentally use Python 2 if both are available.

* Use python3 in travis build

* Install python3-pip package on travis trusty image

* Fix pip detection in checkout-deps.sh
2021-03-07 13:50:15 +01:00
Arron Vinyard
70b6e96f95 Fix documentation constant reference 2021-03-07 13:45:16 +01:00
Peace-Maker
91a1fd074b Fix sql injection in sql-admin-manager plugin
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.
2021-02-02 11:20:02 +01:00
Impact
a615c139e6
Update note about non-existing SQL_MoreResults (#1416) 2021-01-14 14:50:15 +00:00
komashchenko
978fa6b252
Fix detour HandleCommand_Buy_Internal (#1406) 2020-12-18 12:10:10 +00:00
c0rp3n
24f90449ad [CS:GO] Remove control chars from gamedata 2020-12-16 16:17:14 +01:00
Peace-Maker
ba8753836e Cleanly remove all hooks on extension unload
Allows to e.g. reload sdktools during runtime without crashing. Useful for fast development cycles.
2020-12-16 15:52:48 +01:00
kidfearless
e59fd9de96 Fix missed old syntax parameter in menus 2020-12-13 20:12:07 +01:00
Loïc
6c4079cb94 Fix error description
As coded in aae7161273/core/logic/smn_players.cpp (L1405), its a "client not in game", not "client not connected".
2020-12-13 20:10:11 +01:00
Natanel Shitrit
c2b806563e
Update 'CScore' offset for CS:GO (#1394) 2020-12-04 17:13:10 +00:00
Vauff
15d912df38
Update TerminateRound signature for CS:GO linux (#1392) 2020-12-04 00:10:51 +00:00
Einyux
a191a907e9
Add new trie native: ContainsKey() (#1390) 2020-11-30 20:51:47 -08:00
Arron Vinyard
0caa349f6a
Update cookie funcs to return newdecl Cookie (#1379) 2020-11-07 13:16:29 -08:00
Headline
1cd0efad41
NPOTB: Fix no SDK target exception (#1359) 2020-11-07 13:14:58 -08:00
Mustafa Enes AKDENİZ
9d49bbfaf0
Fixed unauthorized menu usages (#1374)
* Fixed unauthorized menu usages

Let's say we have kick flag but don't have admin menu flag.
When we type !kick, menu opens with a back button, when we click back button, we go parent menu without admin menu flag

* Update ban.sp
2020-11-05 11:34:00 +01:00
Peace-Maker
3eb2cd2971 Remove verbose hl2sdk-X not found warning
None of the available usage options have any use for such a warning.
2020-10-28 20:55:00 +01:00
Nicholas Hastings
8e7d41ec02
Add NULL check to GetEntPropString return. (#1376)
This can be NULL for non-interned strings that don't have a value set.
2020-10-27 18:51:12 -04:00
Mustafa Enes AKDENİZ
94ea925152 Improvements on !admin menu flags (#1364)
* Improvements on !admin menu flags

Lets say we have override the sm_unmute command and changed it to ADMFLAG_CUSTOM1.
Then create an admin, we gived our admin ADMFLAG_Chat flag, admin can't use sm_unmute command cause it doesnt have access to this command.
But if admin go into "!admin" menu then, he will able to run sm_unmute on "player command" menus

* removed unauthorized menu items

* Deleted Whitespace and ITEMDRAW_DEFAULT
2020-10-24 23:52:35 +00:00
Nicholas Hastings
18d93ff677
Sendprop string fixes (#1372)
* Fix reading SendProp non-interned strings.

* Make Get/SetEntPropString for SendProps use same macros as other funcs.
2020-10-23 11:26:54 +00:00
David Anderson
d48cf93a94 Fix builder.target usage. 2020-10-22 23:41:01 -07:00
Mr. Silence
104b6b878a
[ZPS] Gamedata update for sdktools/sdkhooks (#1369)
* Gamedata update for ZPS 3.1

Signed-off-by: Mr.Silence <Silenci0@users.noreply.github.com>

* Offset updates for ZPS 3.1

Signed-off-by: Mr.Silence <Silenci0@users.noreply.github.com>

* Updated offsets and signatures.

Signed-off-by: Mr.Silence <Silenci0@users.noreply.github.com>
2020-10-20 03:58:35 +00:00
Erik Minekus
90b68f095f
Fix spcomp64 filename for Windows #1368 2020-10-19 19:02:20 +02:00
Asher Baker
6a4364d404
Update credits (#1367) 2020-10-16 21:41:21 +01:00
peace-maker
5e819f6596
Update SourcePawn (#1365) 2020-10-14 18:15:35 -07:00
Mikusch
eef96da641
tf2: Add TFCond_PowerupModeDominant (#1361)
* Add TFCond_PowerupMode_Dominant

* comma

* Consistency
2020-10-02 17:33:57 -07:00
Rostu13
c38b392fdf
sdktools: permit symbol signatures on win32 (#1346)
* Fix sig scanner for windows

* fix linux build

* Update vcaller.cpp

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-10-02 17:33:05 -07:00
David Anderson
e0d9dfb68e
sourcepawn: uplift FakeNative to DynamicNative. (#1338)
This removes calls to CreateFakeNative.
2020-10-02 16:42:31 -07:00
Scags
589d6df75d
gamedata: implement GetMemSig (#1345) 2020-10-02 16:40:13 -07:00
Scags
6fd9d1ce11
gamedata: automate reparsing on load (#1348)
* Add sm_reload_gamedata

* Remove redundant cast

* Automate gamedata reparsing

* Update GameConfigs.cpp

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-10-02 16:25:27 -07:00
Headline
ef36604666
datapack: remove legacy cache (#1357) 2020-10-02 16:04:30 -07:00